/* 示例代码:简单的 CSS 样式 */
body {
font-family: Arial, sans-serif;
background-color: #f0f0f0;
color: #333;
margin: 0;
padding: 0;
}
header {
background-color: #4CAF50;
color: white;
padding: 10px 0;
text-align: center;
}
nav {
display: flex;
justify-content: center;
margin: 10px 0;
}
nav a {
margin: 0 15px;
text-decoration: none;
color: #4CAF50;
font-weight: bold;
}
main {
padding: 20px;
background-color: white;
margin: 10px;
border-radius: 5px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
footer {
text-align: center;
padding: 10px;
background-color: #4CAF50;
color: white;
position: fixed;
bottom: 0;
width: 100%;
}
/* 解释说明:
- body: 设置全局字体、背景颜色、文字颜色和外边距。
- header: 设置页面顶部的样式,包括背景颜色、文字颜色、内边距和文本居中。
- nav: 使用 Flexbox 布局使导航链接居中显示,并设置链接的样式。
- main: 设置主要内容区域的内边距、背景颜色、外边距、圆角和阴影效果。
- footer: 设置页面底部的样式,包括背景颜色、文字颜色、内边距、文本居中,并将其固定在页面底部。
*/
上一篇:css动画keyframes
下一篇:css字体颜色怎么设置
Laravel PHP 深圳智简公司。版权所有©2023-2043 LaravelPHP 粤ICP备2021048745号-3
Laravel 中文站