2013-02-24 43 views
-2

會有人能夠解釋如何在CSS和HTML標記會找一個垂直的新聞源設計,如:http://dribbble.s3.amazonaws.com/users/41027/screenshots/619599/attachments/51139/TheSecret_Concept.png垂直新聞源設計

我真的很喜歡與右側的文本的圖標+線。我知道CSS有內容屬性,我可以添加一個符號,併爲垂直線使用邊框,但我想知道如何使用圖像/引導程序圖標,而不是在CSS中聲明符號。

任何提示或教程將不勝感激。

+0

查看源代碼?你會得到代碼... – mpm 2013-02-24 06:09:24

+0

這是一個概念圖像... – MCG 2013-02-24 06:11:33

+4

嘗試編碼的東西,然後拿出一些代碼時,你卡住了,沒有人會爲你寫代碼。 – mpm 2013-02-24 06:13:39

回答

1

This is some truly horrific CSS, for which I should probably be shot, however, it seems to be vaguely something like you posted. That is; assuming this is what you were talking about.

Anyway, assuming you're talking about those little pieces of text by Zane David or whoever, with the icon on the side and a line running through the icons, here is my terrible attempt at doing it with an unordered list with modified bullets and an hr running through them. The


is definitely not the ideal option, however, I think the ul with li's with custom bullets is the right way to go. Excuse the leaves by the way.

http://jsbin.com/efiveq/1

If you completely ignore my horrible positioning and such, you should still be able to see that an unordered list is probably the best way to go.

Edit: switch out the code for .news-feed .well:after with:

.news-feed .well:after { content:""; position: absolute; top: 60%; left: 5px; border-top: 20px solid #A5A5A5; border-top-color: inherit; border-left: 20px solid transparent; border-right: 20px solid transparent; -webkit-transform: rotate(90deg);

}

+0

非常感謝您的參與!我想出了這個,但任何想法如何我可以將聊天泡泡的三角形與框邊對齊? http://jsfiddle.net/eKTsq/1/ – MCG 2013-02-25 02:28:16

+0

我似乎無法訪問它,你可以做一個jsbin嗎? – Bernie 2013-02-25 02:52:17

+0

對不起,這裏有一個jsbin版本:http://jsbin.com/icumaj/2/ – MCG 2013-02-25 03:04:11