2014-04-08 50 views
-1

我有一個按鈕的CSS和HTML代碼,如下所示。該按鈕會在頭..如何修改按鈕樣式和大小

<div data-role="header" data-position="fixed"> 
      <a href="#home" data-role="button" data-inline="false" data-icon="my-map" data-theme="c" data-iconshadow="false"> 
      <img src='http://img3.wikia.nocookie.net/__cb20131126195004/epicrapbattlesofhistory/images/a/aa/Home_icon_grey.png' alt="custom buttom" /> 
     </a> 

CSS代碼:

.ui-icon-my-map { 

    background-position: 4px 50%; 
    background-size: 16px 11px; 
    height: 12px; 
    margin-top: -8px !important; 
    width: 15px; 
    background-color: transparent; 
} 

按鈕應該會出現類似的圖像,而不是button.and如何按鈕的尺寸減小到普通家庭圖標大小。

+0

請,加的的jsfiddle你代碼(與圖像),因爲,我個人不明白「按鈕應該出現像圖像,而不是按鈕」。在沉迷中......要調整你的按鈕大小,是不是足夠改變它的寬度和高度? –

+0

請檢查我的答案併發送反饋 –

回答

0

修改代碼,這....

<div data-role="header" data-position="fixed"> 
<a href="#home" data-role="button" data-inline="false" data-icon="my-map" data-theme="c" data-iconshadow="false"> 
<img src='http://img3.wikia.nocookie.net/__cb20131126195004/epicrapbattlesofhistory/images/a/aa/Home_icon_grey.png' alt="custom buttom" style="height:32px;border:none;" /> 
</a> 

請評論回來,如果你需要/需要更多幫助,

0
<div data-role="header" data-position="fixed"> <a href="#home" data-role="button" data-inline="false" data-icon="my-map" data-theme="c" data-iconshadow="false" class="home"><img src='http://img3.wikia.nocookie.net/__cb20131126195004/epicrapbattlesofhistory/images/a/aa/Home_icon_grey.png' alt="custom buttom" /> 

.home img { 
height:35px; 
display:block;} 

http://jsfiddle.net/Vgcuj/