CSS的display、hover、overflow、©(版权符号)、borer-radius(边框圆角)
一、display: none 隐藏 block显示
visibility:hidden隐藏 visible显示
display:none和visibility:hidden这两个属性对应的值都是隐藏对像,但是它们隐藏对像有点区别。
display和visibility的区别:display隐藏相当于这个元素没有了,visibility的隐藏该元素所占的位置还在,只是内容隐藏了。
二、hover:不是一个样式,用元素的ID或者CLASS之类后面跟冒号hover,代表鼠标放到此元素上显示哪些样式
例如:

三、overflow
可用值
| 值 | 描述 |
|---|---|
| visible | The content is not clipped. It renders outside the element 内容不会被省掉。会显示在元素的外面 |
| hidden | The content is clipped, but the browser does not display a scroll-bar to see the rest of the content 内容会被省掉,但浏览器不会显示滚动条以用来查看剩余的内容(超出范围隐藏) |
| scroll | The content is clipped, but the browser displays a scroll-bar to see the rest of the content 内容被省掉,但浏览器会显示滚动条以用来查看剩余的内容 |
| auto | If the content is clipped, the browser should display a scroll-bar to see the rest of the content 如果内容被省掉了,浏览器才会显示出滚动条 |
四、borer-radius(边框圆角)
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
#sub1
{
width:200px;
height:200px;
border-radius:15px;
background-color:#093
}
</style>
</head>
<body>
<div id="parent">
<div id="sub1"></div>
</div>
</body>



浙公网安备 33010602011771号