標籤:
一、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>
CSS的display、hover、overflow、©(著作權符號)、borer-radius(邊框圓角)