1500字范文,内容丰富有趣,写作好帮手!
1500字范文 > html:button按钮背景图片设置

html:button按钮背景图片设置

时间:2020-03-31 23:59:46

相关推荐

html:button按钮背景图片设置

W3c没有给出button背景图片的属性标准。但我们可以通过background-size:350px 100px;这两个值来控制背景图片【也可以用像素百分比%来控制】,然后通过background-color: transparent;设置背景色为透明,即可达到给button添加背景图片的效果

<button id="btn1" title="开始预警广播" style="background-image: url(/static/img/start.png);width: 32px;height: 32px;background-repeat:no-repeat ;background-size:32px 32px; border: 0;background-color: transparent;"></button>

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。