您的位置:首页 > Web前端 > CSS

CSS的display、hover、overflow、&copy(版权符号)、borer-radius(边框圆角)

2015-10-14 16:05 597 查看
一、display: none 隐藏 block显示

visibility:hidden隐藏 visible显示

display:none和visibility:hidden这两个属性对应的值都是隐藏对像,但是它们隐藏对像有点区别。

display和visibility的区别:display隐藏相当于这个元素没有了,visibility的隐藏该元素所占的位置还在,只是内容隐藏了。

二、hover:不是一个样式,用元素的ID或者CLASS之类后面跟冒号hover,代表鼠标放到此元素上显示哪些样式

例如:





三、overflow

可用值

描述
visibleThe content is not clipped. It renders outside the element
内容不会被省掉。会显示在元素的外面
hiddenThe content is clipped, but the browser does not display a scroll-bar to see the rest of the content
内容会被省掉,但浏览器不会显示滚动条以用来查看剩余的内容(超出范围隐藏)
scrollThe content is clipped, but the browser displays a scroll-bar to see the rest of the content
内容被省掉,但浏览器会显示滚动条以用来查看剩余的内容
autoIf 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>


内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: