#number_nav ul li { float left; list-style-type none; } #number_n
#number_nav ul li {
float: left;
list-style-type: none;
}
#number_nav ul li a{
color: #F0F0F0;
text-decoration: none;
display: inline-block;
width: 20px;
text-align: center;
}
.red{
background-color: red;
}
.trans{
background-color: transparent;
}
.denglu1 {
float: left;
width: 107px;
height: 34px;
line-height: 34px;
text-align: center;
background: url(img/lib1.png)no-repeat left;
color: #fff;
}
.denglu2 {
float: left;
width: 107px;
height: 34px;
line-height: 34px;
text-align: center;
background: url(img/lib2.png) no-repeat left;
color: #fff;
}
.denglu{
transform: translate(900px,-1000px);
}
链接()的内联块化与交互样式
• display: inline-block 使 既能设置宽高(width: 20px),又能保持文本内联特性。
• text-align: center 实现文本水平居中。
• text-decoration: none 去除链接下划线。
背景图片 + 位置:background: url(img/lib1.png) no-repeat left 设置图片左对齐且不重复。
(简写等价于 background-image + background-repeat + background-position)
• 纯色背景:background-color: red / transparent(透明)。
• 背景与文字颜色搭配(白色 #fff 提升可读性)。
类名语义化与组合样式
• .red / .trans 等类名表示状态(选中/未选中),可动态切换背景色。
• 不同类名(.denglu1 / .denglu2)通过不同背景图区分登录/注册等按钮样式

浙公网安备 33010602011771号