2013-05-03 26 views
0

我想製作一個可以在面前展示的按鈕...任何想法?製作一個重疊按鈕

.button { 
    position:absolute; 
    top:240px; 
    left: 452.5px; 
    width:110px; 
    height:40px; 
    display: block; 
    margin-bottom: 10px; 
    text-align: center; 
    line-height: 30px; 
    margin: 20px; 
    cursor: pointer; 
    color: #fff; 
    text-align: center; 
    border: solid #009c93 1px; 
    border-top-right-radius: 7px; 
    border-bottom-right-radius: 7px; 
    background: #009c93; 
    text-shadow: 2px 2px #222222); 
} 
+0

您正在尋找''如果我理解您可能會發現 – Morpheus 2013-05-03 09:33:01

+0

,但重疊是一個三角形形狀,懸停在文本框上,是否可以通過佔位符? – Connor 2013-05-03 09:34:14

回答

4

他們使用這樣的:

.button::before { 
    content: ''; 
    position: absolute; 
    border-width: 8px 8px 8px 0; 
    border-style: solid solid solid none; 
    border-color: transparent #D83C3C transparent; 
    top: 12px; 
    left: -6px; 
} 

BTW。佔位符與此無關!這是純粹的CSS。

+0

我怎麼可以添加到我的網站? http://thiv.net/ – Connor 2013-05-03 09:38:04

+0

請考慮改變你的標語排版,爲人類的緣故。 – Kayo 2013-05-03 09:41:18

+0

你是什麼意思? – Connor 2013-05-03 09:42:29