Html 以图像为背景的css按钮
CSS HTMLHtml 以图像为背景的css按钮,html,css,image,background,background-image,Html,Css,Image,Background,Background Image,CSS HTML 这是我的按钮图像的html和css我的问题是如何去除图像之外的背景我指的是图像后面的矩形我的图像没有背景,因为它看起来像使用背景作为透明 #printbutton{ width: 156px; height: 63px; background-image: url(../images/Untitled_1.png); background-repeat: no-repeat; } 使用背景作为透明 #printbutton{ widt
这是我的按钮图像的html和css我的问题是如何去除图像之外的背景我指的是图像后面的矩形我的图像没有背景,因为它看起来像使用背景作为透明
#printbutton{
width: 156px;
height: 63px;
background-image: url(../images/Untitled_1.png);
background-repeat: no-repeat;
}
使用背景作为透明
#printbutton{
width: 156px;
height: 63px;
background-image: url(../images/Untitled_1.png);
background-repeat: no-repeat;
}
将按钮塑造为图像,添加按钮高度、宽度和边框半径
button{
margin : 0;
padding : 0;
border : 0;
background : transparent;
font-family : inherit;
font-size : 1em;
cursor : pointer;
}
将按钮的形状设置为图像,添加按钮的高度、宽度和边框半径
button{
margin : 0;
padding : 0;
border : 0;
background : transparent;
font-family : inherit;
font-size : 1em;
cursor : pointer;
}