gpt4 book ai didi

html - 这个 CSS3 发生了什么?我找不到它

转载 作者:技术小花猫 更新时间:2023-10-29 12:11:05 27 4
gpt4 key购买 nike

我做了一个带有一些效果的按钮。当我在浏览器中测试时,它仅在 mozilla 中运行良好。我无法找到为什么不能在 -webkit- 浏览器中工作 谁能告诉我为什么这段代码不能工作 检查这个 fiddle http://jsfiddle.net/sarfarazdesigner/Qtw3x/

这里是html代码

<button name="feat-btn" id="feat-btn" class="push-button" type="submit">
<span>Submit</span>
</button>

这里是css

.push-button {
background: none repeat scroll 0 0 transparent;
border: medium none;
color: #FFFFFF;
cursor: pointer;
display: inline-block;
font-size: 18px;
padding: 0;
text-align: center;
text-decoration: none;
text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
}
.push-button span:after {
-moz-border-bottom-colors: none;
-moz-border-left-colors: none;
-moz-border-right-colors: none;
-moz-border-top-colors: none;
border-color: #357536 transparent -moz-use-text-color;
border-image: none;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-style: solid solid none;
border-width: 5px 5px 0;
content: "";
display: block;
margin: 0 -1.7em;
overflow: hidden;
text-indent: -9999px;
}
.push-button span:before {
border-radius: 8px 8px 8px 8px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
content: ".";
display: block;
height: 55px;
left: 0;
position: absolute;
top: 0;
width: 100%;
z-index: -1;
}
.push-button span {
background-color: #4FB051;
border-bottom: 1px solid #6FBE70;
display: inline-block;
height: 49px;
line-height: 50px;
margin-bottom: 5px;
min-width: 110px;
padding: 0 1.7em;
position: relative;
}
.push-button:hover span{background-color:#52a853;}

首先在 mozilla 中检查它然后你就会明白它的外观或者你可以看到下面的图片这是在 mozilla 中查找 enter image description here

这是在 webkit 浏览器中查找 enter image description here

最佳答案

.push-button span:after 选择器中的 border-color 发生了一些奇怪的事情

border-color: #357536 transparent -moz-use-text-color;

只需将其更改为#357537

jsFiddle

border-color: #357536;

通过该更改,我可以在 Chrome 和 Firefox 中使用。

关于html - 这个 CSS3 发生了什么?我找不到它,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16411627/

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