2020.5.18

1.上午学了超链接样式:

/* CSS Document */
/ *未访问时的样式*/
V a:link{
color: red;
text-decoration: none;
}
/ *鼠标点击后的样式*/
V a:visited{
color :green;
}
/ *鼠标放上去的时候的样式*/
▼a:hover{
color :pink;
}
/ *鼠标点击时的样式*/
V a:active{
color :yellow;
}
V div{
width: 200px;
height: 200px;
background-color: red;
}
/ *当鼠标放上去时的样式*/
V div:hover{
width: 300px;
background-color: pink;
/*鼠标变小手*/
cursor: pointer ;
}

2.背景样式:

/* CSS Document */
▼#dl{
width: 200px;
height: 100px;
/*背景颜色*/
background-color: red;
▼body{
/ *background- image:url(img/c.png);*/
/*横向平铺*/
/ *background-repeat: repeat-x;*/
/ *background-repeat: repeat-y; */
background-repeat:no-repeat;
/ *固定背景图随着滚轮滚动*/
background- attachment: fixed;
}
▼#d2{
width: 400px;
height: 200px;
background-image: url(img/c.png) ;
background-position: -195px -64px;
}

3.浮动布局:

/* CSS Document +/
#d1{
width : 600px;
height: 600px;
background: red;
}
#d2{
width:200px;
height: 200px;
background: pink;
float:
left;
/ *外边距*/
/ *margin: 10px;*/
/ *margin-top: 5px;
margin-r ight: 10px;
margin-bottom: 30px;
margin-left: 20px; */
/*上右下左*/
margin: 5px 10px 30px 20px;
}
#d3{
width: 200px;
height: 200px;
background: yellow;
float: left;
#d4{
width: 400px;
height: 200px;
background: blue;
clear: both;

}

总结一天的笔记。

猜你喜欢

转载自www.cnblogs.com/LNH2019/p/12911297.html