您可以通过将 CSS 添加到主题文件来更改文件列表和上传表单的样式。诀窍是针对正确的 HTML元素.
以下是一些方便复制粘贴的基本 CSS 片段。
指定列表的宽度
要控制文件列表的整体宽度,请使用以下样式来定位包装容器:
body .eeSFL { /* Use body to ensure specificity */
max-width: 80%; /* Adjust this value as needed */
margin: 0 auto; /* Centers the list horizontally */
}
更改文件名字体大小
您可以增大或减小文件名的字体大小以增强可读性。
.body eeSFL_FileName {
font-size: 1.2em; /* Increase to 1.2 times the base size */
}
更改缩略图的大小
要更改文件列表中的缩略图大小,请使用此样式来更改尺寸:
body .eeSFL_Thumbnail img {
width: 128px; /* Double the size */
height: auto; /* Maintain aspect ratio */
}
将上传说明移至左侧
如果您希望将上传说明左对齐,请应用以下样式:
body .sfl_instuctions {
text-align: left; /* Align text to the left */
margin-left: 0; /* Remove any existing left margin */
}
将文件名设置为按钮样式
为了使文件名看起来像一个按钮,请添加一些填充、背景颜色和边框样式:
body .eeSFL_FileName {
display: inline-block;
padding: 10px 15px; /* Add padding around the text */
background-color: #0073aa; /* Set background color */
color: #fff; /* Set text color */
text-decoration: none; /* Remove underline */
border-radius: 5px; /* Rounded corners */
transition: background-color 0.3s ease; /* Smooth hover transition */
}
body .eeSFL_FileName:hover {
background-color: #005177; /* Darker shade on hover */
}