gpt4 book ai didi

html - 按钮内的文字闪烁

转载 作者:行者123 更新时间:2023-11-28 15:42:39 24 4
gpt4 key购买 nike

这仅在 IE 中存在。请仅在 IE 中打开 fiddle。

https://jsfiddle.net/hfmn6axh/

html:

<button class="Main_button find_button" type="submit">Find<span   class="icon"></span></button>

CSS:

.Main_button{
background-color: #747474;
}
.find_button {
display: inline;
padding: 7px 10px;
padding-top: 4px;
color: white;
float: left;
line-height: 25px;
font-size: 13px;
font-weight: bold;
padding-right: 10px;
border: solid 0px;
height: 33px;
}
.icon {
background: url(https://cdn2.iconfinder.com/data/icons/deadsimple/youtube.gif) no-repeat right center;
height: 10px;
width: 18px;
display: inline-block;
margin: 5px 0px 0px 5px;
}

当您点击按钮时,按钮的内容会改变其对齐方式。

这能解决吗?

最佳答案

键换行的内容——添加position: relative;顶部:0;左:0;

.Main_button{
background-color: #747474;
}
.find_button {
display: inline-block;
padding: 7px 10px;
padding-top: 4px;
color: white;
float: left;
line-height: 25px;
font-size: 13px;
font-weight: bold;
padding-right: 10px;
border: solid 0px;
height: 33px;
}
.icon {
background: url(https://cdn2.iconfinder.com/data/icons/deadsimple/youtube.gif) no-repeat right center;
height: 10px;
display: inline-block;
width: 18px;
margin: 5px 0px 0px 5px;
}
span{
position: relative; top: 0; left: 0;
}
<button class="Main_button find_button" type="submit"><span >Find</span><span class="icon"></span></button>

关于html - 按钮内的文字闪烁,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30524222/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com