這是我到目前爲止:http://jsfiddle.net/F8AN4/如何在div上創建垂直居中的會議邊界?
我想在垂直居中,並指向屏幕的左側/右側div的每邊的邊界。我已經看到了這一點,但是我不知道該怎麼做!
它看起來像:
-----|DIV|------
CSS
div {
background: lightgreen;
height: 100px;
margin: 0 auto;
position: relative;
width: 200px;
}
div::after {
border-right: 10px solid black; // not sure how to do this.
content: "";
top: 0; left: 0; right: 0; bottom: 0;
position: absolute;
}
div::before {
content: "";
top: 0; left: 0; right: 0; bottom: 0;
position: absolute;
}
任何想法?
你能告訴我們什麼顯示你需要(上傳圖片imgur圖像並分享它的網址) – Zword