2013-12-13 217 views
3

我想知道是否可以風格的分享按鈕鏈接。這裏是我想訪問的鏈接(嵌套在Facebook的iframe中)。風格的Facebook分享按鈕鏈接

<a class="pluginShareButtonLink" href="/sharer.php? 
app_id=XXXXXXXXXXXXXXX&amp;sdk=joey&amp;u=http%3A%2F%2FXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&amp; 
display=popup" target="_blank" id="u_0_1"><div class="blueButton blue"><div 
class="pluginButton"><div><div class="pluginButtonContainer"><div 
class="pluginButtonImage"><button type="submit"><i class="pluginButtonIcon img sp_25oo7a 
sx_e52148"></i></button></div><span class="pluginButtonLabel">Share</span></div></div> 
</div></div></a> 

我試圖改變類pluginShareButtonLink的風格如下:

.pluginShareButtonLink:hover{ 
    text-decoration: none; 
} 

而且它不工作。我也嘗試用jQuery改變樣式,但這也不起作用。能以某種方式完成嗎?

感謝

回答

0
**You can style the button with this css and you can change the background color to any color you want.** 

    solution 1 (without gradient background color) 
    .pluginButtonContainer button{ 
    padding: 10px; 
    width: 70px; 
    height: 35px; 
    background: rgb(255, 70, 70); 
    border: 0px!important; 
    border-radius: 2px; 
    } 

    solution 2 (with gradient background color) 
    .pluginButtonContainer button{ 
    padding: 10px; 
    width: 70px; 
    height: 35px; 
    background: #ff3a3a; /* Old browsers */ 
    background: -moz-linear-gradient(top, #ff3a3a 0%, #ff3a3a 49%, #ff402b 100%); /* FF3.6+ */ 
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ff3a3a), color-stop(49%,#ff3a3a), color-stop(100%,#ff402b)); /* Chrome,Safari4+ */ 
    background: -webkit-linear-gradient(top, #ff3a3a 0%,#ff3a3a 49%,#ff402b 100%); /* Chrome10+,Safari5.1+ */ 
    background: -o-linear-gradient(top, #ff3a3a 0%,#ff3a3a 49%,#ff402b 100%); /* Opera 11.10+ */ 
    background: -ms-linear-gradient(top, #ff3a3a 0%,#ff3a3a 49%,#ff402b 100%); /* IE10+ */ 
    background: linear-gradient(to bottom, #ff3a3a 0%,#ff3a3a 49%,#ff402b 100%); /* W3C */ 
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3a3a', endColorstr='#ff402b',GradientType=0); /* IE6-9 */ 
    border: 0px!important; 
    border-radius: 2px; 
    } 
+0

請加一些解釋你的代碼 – VladL