『壹』 CSS如何設置按鈕背景圖片
我也遇到過這個問題,看下面的:
..button{
background-image:url("***.jpg");
}
按鈕上不出現圖片
..button{
background-color:blue;
background-image:url("***.jpg");
}
這樣設置終於顯示背景圖片了
我就是這樣無意中發現的
『貳』 div+css布局中的怎麼設置設置按鈕的背景圖片
你可以用<input type="image" src=" "/>,src屬性填入指定的按鈕圖片路徑
『叄』 css特效中如何使按鈕背景圖片改變
那要看你想怎麼改了,最基礎的改變方法
.div:hover{背景圖}
『肆』 css按鈕:ACTIVE點擊切換背景圖片
<!DOCTYPEhtml>
<html>
<head>
<style>
#btn{background:red;}
#btn:hover{background:blue;}
</style>
</head>
<body>
<inputid="btn"type="button"/>
</body>
</html>
經驗證是可以的,或許是你的圖片路徑不對,不過ie6不支持偽類:hover屬性,所以如果要兼容ie6就用js或者,用a標簽來代替吧
『伍』 如何給HTML中的button按鈕添加背景圖片,圖片不止一個,可以先看一下要求實現效果,注意:是兩種顏色
需要准備的材料分別有:電腦、瀏覽器、html編輯器。
1、首先,打開html編輯器,新建html文件,例如:index.html。
『陸』 有一個button,我給它設置了一張背景圖片,button有value值,用CSS怎麼調整使value值位於圖片下方
<!DOCTYPEhtml>
<html>
<head>
<metacharset="utf-8">
<styletype="text/css">
button{
background-image:url("seo.jpg");
background-repeat:no-repeat;
}
#text{
position:absolute;
top:30px;
}
</style>
</head>
<body>
<buttonstyle="width:100px;height:100px;"><spanid="text">拍照</span></button>
</body>
</html>
seo.jpg是你的背景圖片,當然圖片的尺寸要合適,然後就是button的value值,當然了,我是這樣寫的,<button style="width: 100px;height: 100px;"><span id="text">拍照</span></button>,這樣將要顯示在button上的值這樣寫在標簽外,給他加個<span>元素,就可以用CSS控制它的位置了,不知道,我這樣理解,符合你的要求不?
不懂,繼續問我。
希望能夠幫助到你,望採納!
『柒』 css按鈕背景圖片不顯示
應該是圖片路徑不對,具體參考以下代碼
<style>
.zzjs_net {
font: 12px Tahoma, Verdana;//設置文字大小、字體
padding: 0 5px;//設置間距
color: #D3E0E7;//文字顏色
background-image: url("/img/2010bu.gif");//背景圖片路徑
background-repeat: repeat-x;//橫向不重復
background-position: 0 50%;
outline: 1px solid #D3E0E7;
border: 1px solid #FFF !important;//邊框
height: 19px !important;//高度
border: 1px solid #D3E0E7;//邊框
height: 21px;//高度
line-height: 17px;//行度
}
</style>
<input class="zzjs_net" type="submit" name="rulesubmit" value="同 意" style="height: 23px">「同意」按鈕
<input class="zzjs_net" type="button" name="return" value="不同意" style="height: 23px">「不同意」按鈕
『捌』 html 如何給button設置背景圖片的同時設置按鈕的背景色
這個可以用css來實現:background:url('imgurl')裡面放圖片地址,如果還想同時顯示背景,需要用透明的PNG圖片,如果不想圖片重復顯示需要設置背景不重復:background-repeat:no-repeat; 然後用background-color:red;設置按鈕的背景顏色。下面例子是簡寫
<inputtype="button"style="background:url(./aa.png)no-repeatcenterred;width:200px;height:200px;">