/* 去除常见标签默认的 margin 和 padding */ body, h1, h2, h3, h4, h5, h6, p, ul, ol, li, dl, dt, dd, input { margin: 0; padding :0; } /* 设置网页统一的字体大小、行高、字体系列相关属性 */ body { font: 16px/1.5 "Helvetica Neue" , Helvetica Arial , "Microsoft Yahei", "Miragino Sans GB" , "Heiti SC" , "WenQuanYi Micro Hei" , sans-serif ; color: #333; } /* 去除列表默认样式 */ ul, ol { list-style: none; } /* 去除默认的倾斜效果 */ em, i { font-style: normal; } /* 去除a标签默认下划线,并设置默认字体颜色 */ a { text-decoration: none; color: #333; } /* 设置img的垂直对齐方式为居中对齐,去除img默认下间隙 */ img { vertical-align: middle; } /* 去除input默认样式 */ input { border: none; outline: none; color: #333; } li.special{ border-radius: 10px; /* 元素的圆角 */ border-top:0.3px solid transparent; transition: box-shadow 0.3s ease-in-out; /* 阴影效果平滑过渡 */ transition: transform 0.3s ease-in-out; } li.special:hover { box-shadow: 0 10px 10px rgba(0, 0, 0, 0.3); /* 鼠标悬停时添加阴影 */ transform: translateY(-5px); } /* 左浮动 */ .fl { float: left; } /* 右浮动 */ .fr { float: right; } /* 双伪元素清除法 */ .clearfix::before, .clearfix::after { content: ""; display: table; } .clear::after { clear: both; }