我正在开发一个小型项目,它应该是公交车上的一个按钮,这是一张显示我的意思的图片:
你可以在停止按钮上看到我正在使用一个盒子阴影,并且阴影中有一条黄线,我想知道是否有任何方法可以删除它?
这是我的CSS代码:
#Stick {
width: 90px;
height: 700px;
border: 1px solid black;
background: grey;
border-radius: 0%;
margin-top: -10px;
margin-bottom: 0px;
margin-left: 1150px;
margin-right: 0px;
}
#ButtonShell {
width: 120px;
height: 200px;
border: 1px solid grey;
background: yellow;
border-radius: ;
margin-top: -450px;
margin-bottom: 0px;
margin-left: 1135px;
margin-right: 0px;
}
#Button {
width: 70px;
height: 70px;
border: 1px solid yellow;
background: red;
border-radius: ;
margin-top: -135px;
margin-bottom: 0px;
margin-left: 1160px;
margin-right: 0px;
box-shadow: 2px 2px 10px 5px red;
}
#ButtonText {
color: white;
font-size: 20px;
font-family: Adobe Text Pro;
margin-top: 24px;
margin-bottom: 0px;
margin-left: 11px;
margin-right: 0px;
}
这是我的HTML代码:
<div id="Stick"></div>
<div id="ButtonShell"></div>
<div id="Button">
<p id="ButtonText">STOP</p>
</div>
答案 0 :(得分:2)
从border: 1px solid yellow;
#Button
中删除此内容
#Stick {
width: 90px;
height: 700px;
border: 1px solid black;
background: grey;
border-radius: 0%;
margin-top: -10px;
margin-bottom: 0px;
margin-left: 1150px;
margin-right: 0px;
}
#ButtonShell {
width: 120px;
height: 200px;
border: 1px solid grey;
background: yellow;
border-radius: ;
margin-top: -450px;
margin-bottom: 0px;
margin-left: 1135px;
margin-right: 0px;
}
#Button {
width: 70px;
height: 70px;
background: red;
border-radius: ;
margin-top: -135px;
margin-bottom: 0px;
margin-left: 1160px;
margin-right: 0px;
box-shadow: 2px 2px 10px 5px red;
}
#ButtonText {
color: white;
font-size: 20px;
font-family: Adobe Text Pro;
margin-top: 24px;
margin-bottom: 0px;
margin-left: 11px;
margin-right: 0px;
}
&#13;
<div id="Stick"></div>
<div id="ButtonShell"></div>
<div id="Button">
<p id="ButtonText">STOP</p>
</div>
&#13;