<style>
/* 公共样式 */
*{
margin:0;/*外边距:0*/
padding:0;/*内边距:0*/
}
li{
list-style:none;/*设置列表属性:无*//*去掉ul里默认的点*/
}
a{
text-decoration:none;/*文本装饰效果:无*//*去掉a标签下划线*/
}
.nav{
width:1200px;/*宽:1200像素*/
/* border:1px solid #000; */
margin:20px auto;/*元素水平居中*/
}
/* 。nav清楚浮动 */
.nav:after{/*伪元素*/
content:"";/*内容:空*/
display:block;/*元素方式:块元素*/
clear:both;/*清楚浮动:两端*/
}
.nav_logo,.nav_list{
float:left;/*浮动:左*/
}
.nav_list{
overflow:hidden;/*清除浮动*//*溢出:隐藏*/
margin-left:88px;/*外边距:左*/
background:red;/*背景颜色:红*/
height:38px;/*高:38像素*/
line-height:38px;/*设置行高*/
}
.nav_list>li{
float:left;/*浮动:左*/
width:165px;/*宽:165像素*/
/* border:1px solid #000; */
text-align:center;/*水平对齐方式:居中*/
}
.nav_list>li>a{
color:#fff;/*颜色:#fff*/
}
/* 汽车列表 */
.car{
width:1200px;/*宽:1200像素*/
margin:0 auto;/*外边距:上下0 左右自动 *//*元素水平居中*/
/* border:1px solid #000; */
margin-top:50px;/*外边距-上:50像素*/
}
/* 汽车标题 */
.car_title{
text-align:center;/*文本-对齐:居中*/
}
.car_title>p{
border:1px solid #000;/*边框:1像素 实线 黑色*/
width:50px;/*宽:50像素*/
display:inline-block;/*控制一个元素的状态:行内-块元素*/
margin-bottom:5px;/*外边距-下:5像素*/
}
.car_title>i{
font-weight:bold;/*字体属性-字体粗细:粗*/
font-size:18px;/*字体属性-字体大小:18像素*/
}
/* 汽车列表 */
.car_show>p,.car_show>ul{
float:left;/*浮动:左*/
}
.car_show{
margin-top:20px;/*外边距-上:20像素*/
}
.car_show:after{/*伪元素*/
content:"";/*内容:空*/
display:block;/*控制一个元素的状态:块元素*/
clear:both;/*清除浮动:两端*/
}
.car_show>ul{
overflow:hidden;/*溢出:隐藏*/
border-top:1px solid #000;/*边框-上:1像素 实线 黑色*/
border-bottom:1px solid #000;/*边框-下:1像素 实线 黑色*/
width:900px;/*宽:900像素*/
}
.car_show>ul>li{
float:left;/*浮动:左*/
width:224px;/*宽:224像素*/
text-align:center;/*文本-对齐:居中*/
border-right:1px solid #000;/*边框-右:1像素 实线 黑色*/
}
.car_show>ul>li>p{
text-align:left;/*文本-对齐:左对齐*/
padding-left:5px;/*内边距-左:5像素*/
line-height:35px;/*设置行高:35像素*/
}
.car_show>ul>li>span{
text-align:left;/*文本-对齐:左对齐*/
padding-left:5px;/*内边距-左:5像素*/
display:inline-block;/*控制一个元素的状态:行内-块元素*/
width:100%;/*宽:百分之百*/
color:red;/*颜色:红*/
}
.car_show>ul>li:nth-child(5),
.car_show>ul>li:nth-child(6),
.car_show>ul>li:nth-child(7),
.car_show>ul>li:last-child{
padding-top:18px;/*内边距-上:18像素*/
}
</style>
2019-04-17 考试题样式
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
推荐阅读更多精彩内容
- 老男孩Linux运维第一阶段58期综合考试题 1. 在11月内,每天早上6点到12点,每隔2小时执行一次/usr/...
- Day30 |作者:方维超 归档:课堂笔记 时间:2019/4/11 老男孩教育教学核心思想6重:重目标、重思路、...