我的按钮文本在 safari 中显示在一行上(即使在初次单击后),但是在 google chrome 上,当您第一次到达该按钮时,我的按钮将显示在一行上,但是当您浏览更多帖子并再次遇到“加载更多”按钮时,文本搞砸了。这只发生在谷歌浏览器上。
when you get to the load more button the first time..
当您第二次到达“加载更多”按钮时..
这是我的CSS...我尝试添加宽度,尽管它解决了按钮不居中的问题
.elm-wrapper {
margin: 1em auto;
text-align: center;
}
.elm-button {
-webkit-transition: all 0.15s ease;
transition: all 0.15s ease;
background-color: #ffffff;
text-shadow: none;
box-shadow: none;
border: none;
padding-top: 45px;
padding-bottom: 25px;
font-family: 'Montserrat', sans-serif;
text-transform: uppercase;
font-size: 19px;
color: #848484;
outline: none;
}
.elm-button.ajax-inactive {
display: none;
}
.elm-button.is-loading .elm-button-text {
display: none;
}
.elm-loading-anim {
display: none;
}
.elm-button.is-loading .elm-loading-anim {
display: block;
}
.elm-loading-icon {
width: 1.5em;
height: 1.5em;
}
.elm-button:not(.is-loading)::before {
content: "v";
font-size:11px;
float: right;
margin: 6px 0 0 16px;
font-family: 'Days One', sans-serif;
}
您想尝试使用:
.btn {
white-space: nowrap;
text-align: center;
}
While white-space: nowrap
强制按钮中的文本永不换行,您也可以使按钮display
as inline-block
,因此您不必指定特定的宽度。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)