CSS中常用属性
/* *作者:呆萌老师 *☑csdn认证讲师 *☑51cto高级讲师 *☑腾讯课堂认证讲师 *☑网易云课堂认证讲师 *☑华为开发者学堂认证讲师 *☑爱奇艺千人名师计划成员 *在这里给大家分享技术、知识和生活 *各种干货,记得关注哦! *vx:it_daimeng */
颜色
字体
文本
a{
text-decoration:none; /*文本装饰 none 去掉下划线 */
}
a:hover{
text-decoration: underline;/*下划线*/
}
.price{
text-decoration: line-through; /*删除线*/
}
.info p{
text-indent: 30px; /*首行缩进*/
}
.list li{
width: 150px;
border: 1px solid red;
white-space: nowrap ; /*强制在一行内显示*/
overflow: hidden; /*溢出的部分 隐藏*/
text-overflow: ellipsis; /*溢出的文本部分 显示为 ...*/
}
.div_center{
text-align: center; /*文本对齐方式*/
}
列表
列表样式的处理
去掉list-style
- 给li设置背景图片
.list2 li{
/*
background-image: url(../img/arrow.gif);
background-repeat: no-repeat;
background-position: left center; */
background: url(../img/arrow.gif) no-repeat left center;
border: 1px solid red;
padding-left: 10px;
}



浙公网安备 33010602011771号