我已經創造你附加的圖像看到的東西的CSS:創建使用CSS
現在我用這個作爲背景圖片
background-image: url("corner.png");
background-size: cover;
,然後添加文本壟斷邊界但我知道那裏確實存在一個CSS的解決方案,爲此創建此邊框,所以如果有人請幫我這個我試圖找到,但我沒有找到適當的解決方案
我已經創造你附加的圖像看到的東西的CSS:創建使用CSS
現在我用這個作爲背景圖片
background-image: url("corner.png");
background-size: cover;
,然後添加文本壟斷邊界但我知道那裏確實存在一個CSS的解決方案,爲此創建此邊框,所以如果有人請幫我這個我試圖找到,但我沒有找到適當的解決方案
.arrow-down {
width: 200px;
height: 50px;
position: relative;
background: red;
}
.arrow-down:after {
content: '';
width: 0;
height: 0;
border-left: 20px solid transparent;
border-right: 20px solid transparent;
border-top: 20px solid #f00;
position: absolute;
bottom: -19px;
}
<div class='arrow-down'>fgdfgdfgfd</div>
這將幫助你。 它將使用CSS創建箭頭。
入住這fiddle希望你是指這樣的事情。
a.tooltips {
position: relative;
display: inline;
}
a.tooltips span {
position: absolute;
width:140px;
color: #FFFFFF;
background: #000000;
height: 30px;
line-height: 30px;
text-align: center;
visibility: hidden;
border-radius: 6px;
}
a.tooltips span:after {
content: '';
position: absolute;
top: 100%;
left: 50%;
margin-left: -8px;
width: 0; height: 0;
border-top: 8px solid #000000;
border-right: 8px solid transparent;
border-left: 8px solid transparent;
}
a:hover.tooltips span {
visibility: visible;
opacity: 0.8;
bottom: 30px;
left: 50%;
margin-left: -76px;
z-index: 999;
}
感謝您的小提琴,但這不是一個工具提示acutally,它的div本身。 – Sikander
您也可以從下面的鏈接生成它並使用它。
http://apps.eky.hk/css-triangle-generator/
.arrow {
width: 250px;
height: 60px;
position: relative;
background: #333;
}
.arrow:after {
content: '';
width: 0;
height: 0;
border-left: 15px solid transparent;
border-right: 15px solid transparent;
border-top: 15px solid #333;
position: absolute;
bottom: -15px;
left:25px;
}
<div class="arrow"></div>
有,你可以直觀地通過幾個旋鈕擺弄創建他們夫婦的網站。搜索* css邊框箭頭*或* css邊框三角形*,然後找到它們。 –
Duplicate解決了我的問題:) – Sikander