2017/11/6课堂练习
<html>
<head>
<title></title>
<style type="text/css">
a{
font-size
/*未单击访问过的状态*/
a:link{
color:red;
}
/*访问过的样式*/
a:visited{
color:yellow;
}
/*鼠标悬浮样式*/
a:hover{
font-size:40px;
}
/*鼠标按下未松口样式*/
a:active{
font-size:30px;
}
/*注意:设置顺序link>visited>hover>active*/
ul li{
/*circle decimal none disc */
list-style-type:squire;
list-style-image:url(.././img/1.jpg);
list-style-position:inside;
}
li{
/*清楚list的默认样式*/
list-style:none;
}
p{
background-color:red;
background-image:url(../../img/1.jpg);
height:100px;
/*重发方式:repeat repeat-x repeat-y no-repeat*/
background-repeat:no-repeat;
/*背景图片位置*/
background-position:center;
}
ul{
/*顺序:颜色 图片 位置 平铺方式*/
background:blue url(../../img/1631ogo.gif) right bottom no-repeat;
/*auto 百分比 cover(充满) contain */
background-size:cover;
}
div{
border:solid 1px red;
width:100px;
height:100px;
/*
*IE浏览器是Trident内核,加前缀:-ms-
Chrome浏览器是Webkit内核,加前缀-webkit-
Safari浏览器Webkit内核,加前缀:-webkit-
Opera浏览器是Blink内核,加前缀:-o-
Firefox浏览器是Mozilla内核,加前缀:-moz-
*/
background:-ms-linear-gradient(right,red,blue);
background:-webkit-linear-gradient(left bottom,red,blue);
background:-moz-linear-gradiet(right,red,blue);
}
</style>
</head>
<body>
<p>
超链接伪类样式
</p>
<a href="文本.html">aaaa</a>
<ul>
<li>xxxx</li>
<li>xxxx</li>
<li>xxxx</li>
</ul>
</body>
</html>
背景属性:背景颜色、背景图片、背景重复(background属性)
浙公网安备 33010602011771号