2014-04-04 21 views
0

我試圖做這樣的事情:CSS - 做漂亮的滑蓋沒有把圖像在HTML

http://funedit.com/imgedit/soubory/small_6719449301396601413.jpg

的問題是我在CSS完全以新的,我不知道如何使它,我只是嘗試這樣的:

.newsnames{ 
    background-image: url("images/newsname-right.png"); 
    background-repeat: repeat-x; 
    width:572px; 
    height:227px; 
    display:inline-block; 
    position: absolute; left: 415px; top: 39px; right: 0px; bottom: 0px; 
    font-family: Arial; 
    font-weight: 13px; 
    color: white; 
    text-decoration: none; 
    line-height: 45px;  
} 

,但它只是給它黑暗的背景和地位,但我需要的是讓一切看起來就像圖像,我完全地失去了,可以有人幫助我呢?

我actualy嘗試可以在這裏看到:http://funedit.com/andurit/newnew/

附:它非常重要,所有的圖像必須去CSS而不是HTML!

舒爾我把它分成3部分? (那藍色的箭頭,中間和右邊的日期和聊天buble?如果是我怎麼可以改變3件事情之一:懸停?

+0

請創建一個jsfiddle,我們可以做一些花哨的東西,然後編輯鏈接到您的問題然後http://www.jsfiddle.net – CodeFanatic

+0

是的,我想看到它在jsfiddle。 – HaydnJW

+0

http://jsfiddle.net/JEzdF/2/這裏它是但沒有圖像一些部分看起來很可怕:( – user3009924

回答

0

你必須給你的CSS的Z索引,以便您的權利層將在圖片上方顯示

.newsnames{ 
     background-image: url("images/newsname-right.png"); 
     background-repeat: repeat-x; 
     width:572px; 
     height:227px; 
     display:inline-block; 
     position: absolute; left: 415px; top: 39px; right: 0px; bottom: 0px; 
     font-family: Arial; 
     font-weight: 13px; 
     color: white; 
     text-decoration: none; 
     line-height: 45px;  
     z-index: 1000; 
} 

發生的事情是你的形象在z平面向外突出,所以它出現在你的背景圖像的頂部。

您可以提供其他元素此DIV本身...

+0

我的背景圖像顯示不錯:)在小提琴上它是上傳它沒有上傳任何圖像其不顯示:( – user3009924

0

舒爾我把它分成3部分? (即藍色箭頭,中,右的日期和聊天佈雷如果是啊,我怎麼可以改變3件事情之一:??懸停

在我看來你唯一的機會是使用jQuery來實現這個需求(特別是最後一部分)。