我想设计一个按钮,像把一个图片按钮上的HTML
我写的是创建一个按钮代码
CSS
.button {
color: white;
width: 10%;
font-size: 15pt;
padding: .5em 1em;
cursor: pointer;
box-shadow: 2px 2px 5px hsla(0,0%,0%,.7);
text-shadow: 0px 0px 1px hsla(0,0%,0%,.8);
border-radius: 5px;
margin: 1em;
background-image: -webkit-radial-gradient(50% 0%,160% 100%,hsla(0,0%,100%,.3),hsla(0,0%,100%,.3) 50%,hsla(0,0%,100%,0) 52%, hsla(0,30%,400%,0));
background-color: orange;
text-align: right;
display: inline-block;
}
img {
margin-top: -35%;
margin-left: -20%;
display: block;
}
HTML
<button class="button"><img src="img/Play.png" />Play</button>
但resualt是
谁能帮助我,我怎么把IMG在左侧按钮上?
[图像按钮(http://www.echoecho.com /htmlforms14.htm)是你的朋友 –
@bub imgbutton是好的,但它不接受文本...我想添加toxt到,但吨 –