祈得斌-20201028

1.表格:表格的行列合并
2.表单:action method
3.标签:
块级标签:p ul div
行级标签:a span img
                                                                css3.0(层叠样式表):修饰网页
1.选择器(镜子):精确的选中要修饰的目标
常用的选择器:
(1)*类选择器*/
.box{
    width:300px;
    height: 200px;
                background-color: red;
}
(2)/*标签选择器*/
h1{
    width:400px ;
    height: 300px;
    background-color: #11aabb;
}
类选择器的优先级高于标签选择器(box)
(3)/*id选择器*/
#box{
    width: 400px;
    height: 300px;
    background-color: #123;
}
(4)/*后代选择器*/
p ul li{
    color: blue;
}
(5)/*伪类选择器(鼠标悬停状态)*/
a:hover{
    text-decoration: none;/*取消下划线*/
}
(6)/*通用标签*/{
    margin: 0;/*外边距*/
    padding: 0;/*内边距*/
    border:0;/*边框*/
}
优先级:id选择器>类选择器>标签选择器

修饰字体和文本的常用样式
.box{
    width:400px;
    height:300px;
    border:1px #000000 soider;
}
dive{
 color:red;/*修饰字体的颜色*/
font-size:30px;/*修饰字体的大小*/
font-family:"宋体";/*字体的类型*/
font-style: italic;/*字体的样式*/
font-weight:blod;/*字体加粗*/
letter-spcing:5px;/*字体间距*/
text-align;center;/*对齐方式*/
line-height:400px;/*行高*/
text-decoration:underline;/*文本划线*/
text-shadow:2px(水平阴影距离)2px(垂直阴影距离)3px(模糊距离)yellow;/*字体阴影*/
text-indent:2em;/*首行缩进*/
}
修饰背景的常用样式:
.box{
    width:300px;
    height:300px;
}
div{
    background-color: red;/*背景颜色*/
    background-image: ur1(../img/icon.jpg);/*背景图片*/
    background-size: 300px 300px;/*背景图片的大小*/
    background-repeat: repeat;/*背景图片平铺*/
    background-attachment:fixed ;
    background-position:-100px 0;/* 背景图片平铺*/
}

学习心得:
今天我们跟着老师学习了选择器,能更好的完善网页了,我相信随着我每天的积累最终能有一个很好的收获的。

标签

评论


© 2021 成都云创动力科技有限公司 蜀ICP备20006351号-1