Css 使按钮大小相同
我试图使按钮的大小在整个CSS中保持一致,但是当文本缺少几个字母时,大小就会被忽略 CSS: 请尝试以下代码:Css 使按钮大小相同,css,html,Css,Html,我试图使按钮的大小在整个CSS中保持一致,但是当文本缺少几个字母时,大小就会被忽略 CSS: 请尝试以下代码: .btc { font-family: 'Open Sans', sans-serif; padding: 0.75em 2em; text-align: center; text-decoration: none; text-indent: 500px; color: #FFAA48; border: 2px solid #F
.btc {
font-family: 'Open Sans', sans-serif;
padding: 0.75em 2em;
text-align: center;
text-decoration: none;
text-indent: 500px;
color: #FFAA48;
border: 2px solid #FFAA48;
font-size: 24px;
display: inline;
border-radius: 0.3em;
-webkit-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
position: relative;
overflow: hidden;
background-image: url(https://bitcoin.org/img/icons/opengraph.png);
background-repeat: no-repeat;
background-position: center left 11px;
background-size: 30px 30px;
width: 100%;
}
.btc:hover {
font-family: 'Open Sans', sans-serif;
background-color: #FFAA48;
color: #fff;
border-bottom: 4px solid #FFAA48;
}
首先,我不确定问题出在哪里。您正在尝试使该类的所有按钮大小相同?那么为什么没有宽度和高度属性呢?第二,你能做一个演示吗?谢谢!我不知道有这么简单的解决方法。很高兴我帮了你。如果你在写作上有任何问题。对于任何试图区分这一点的人,解决方案是
width:100%代码>
.btc {
font-family: 'Open Sans', sans-serif;
padding: 0.75em 2em;
text-align: center;
text-decoration: none;
text-indent: 500px;
color: #FFAA48;
border: 2px solid #FFAA48;
font-size: 24px;
display: inline;
border-radius: 0.3em;
-webkit-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
position: relative;
overflow: hidden;
background-image: url(https://bitcoin.org/img/icons/opengraph.png);
background-repeat: no-repeat;
background-position: center left 11px;
background-size: 30px 30px;
width: 100%;
}
.btc:hover {
font-family: 'Open Sans', sans-serif;
background-color: #FFAA48;
color: #fff;
border-bottom: 4px solid #FFAA48;
}