今天继续学样式表。
overflow:hidden; 超出部分隐藏
display:none; 隐藏不占空间
visibility:hidden; 隐藏占空间
注意:margin:XXpx; (XX可以为负数)
opacity(0,1)透明度
border-radius:50%;圆形
今天上午联系代码:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>一条小牛</title>
<style>
* {
margin:0;
padding :0;
}
#d1{
border:5px solid blue;
width:300px;
height:300px;
background-color:black;
border-top-right-radius:20px;
/*display :none;*/ /*隐藏不占空间*/
/*visibility :hidden ;*/ /*隐藏占空间*/
}
#d2 {
border:5px solid red;
width:100px;
height:100px;
margin:10px auto;
background-color:yellow;
overflow:auto;
}
#d3 {
border:10px solid gray;
width:400px;
height:400px;
background-color:blue;
margin-top :-50px;
opacity:0.5;
border-radius :30px;
}
</style>
</head>
<body>
<div id="d1">
<div id="d2">
<div>111</div>
<div>111</div>
<div>111</div>
<div>111</div>
<div>111</div>
<div>111</div>
<div>111</div>
<div>111</div>
<div>111</div>
<div>111</div>
<div>111</div>
</div>
</div>
<div id="d3"></div>
</body>