文章出處

 

 

 

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>帶尖角的邊框</title>
<style>
#first {
position: relative;
width: 200px;
height: 100px;
border: 1px solid;
/* display: none;//不占用原來位置*/
visibility: hidden;
/* visibility: hidden占用原來位置*/

}

#one {
position: absolute;
top: 100px;
left: 20px;
width: 0;
height: 0;
border: 10px solid transparent;
border-top-color: black;
}//黑色的小尖角
#two {
position: absolute;
top: 100px;
left: 21px;
width: 0;
height: 0;
border: 9px solid transparent;
border-top-color: white;
}//白色的小尖角
#test:hover #first{
/* display: block;*/
visibility: visible;
}
</style>
</head>
<body>
<div id="test">
<div id="first">
No matter how long the winter, spring is sure to follow.
<div id="one"></div>
<div id="two"></div>
</div>
<div id="second">more information</div>
</div>

</body>
</html>


文章列表


不含病毒。www.avast.com
文章標籤
全站熱搜
創作者介紹
創作者 大師兄 的頭像
大師兄

IT工程師數位筆記本

大師兄 發表在 痞客邦 留言(0) 人氣(0)