gpt4 book ai didi

html - Firefox 转换 :scale on hover issue

转载 作者:行者123 更新时间:2023-11-28 00:43:50 25 4
gpt4 key购买 nike

将 transform:scale 应用到我的元素时,边框颜色变得困惑。想知道这是否是一个已知问题并且有解决方案?如果我删除比例动画工作正常和边框恢复正常。我也尝试了两种方法,当放大和缩小问题仍然存在时。尝试了缩放、变换原点,似乎没有什么可以解决这个奇怪的问题。这在 chrome 中也没有问题。
JSfiddle

body {
background-color: lightblue;
}

.player-chromecast {
border: 2px solid white;
border-radius: 4px;
width: 22px;
height: 17px;
position: relative;
margin: 10px;
}

.player-chromecast:hover {
transform: scale(1.1)
}

.broadcast {
background-color: lightblue;
width: 18px;
height: 19px;
position: absolute;
bottom: -3px;
left: -2px;
}

.broadcast:after {
content: '';
height: 5px;
width: 5px;
border-top-right-radius: 20px;
position: absolute;
top: 13px;
background-color: white;
}

.reception {
border: 2px solid white;
border-bottom-color: transparent;
border-left-color: transparent;
border-top-right-radius: 20px;
position: absolute;
}

.first-bar {
height: 6px;
width: 6px;
top: 8px;
}

.second-bar {
height: 11px;
width: 11px;
top: 3px;
}
<div class="player-chromecast">
<div class="broadcast">
<div class="reception first-bar"></div>
<div class="reception second-bar"></div>
</div>
</div>

最佳答案

body {
background-color: #20262e;
}

h1 {
color: white;
text-align: center;
}
.player-chromecast:hover .reception {
border-bottom-color: transparent;
border-left-color: transparent;
}
p {
font-family: verdana;
font-size: 20px;
}

.player-chromecast {
border-left: 1px solid #fff !important;
border: 2px solid white;
border-radius: 4px;
width: 22px;
height: 17px;
position: relative;
margin: 10px;
border-bottom: 1px solid #fff !important;
}

.player-chromecast:hover {
transform: scale(1.1)
}

.broadcast {
background-color: #20262e;
width: 18px;
height: 19px;
position: absolute;
bottom: -3px;
left: -2px;
}

.broadcast:after {
content: '';
height: 5px;
width: 5px;
border-top-right-radius: 20px;
position: absolute;
top: 13px;
background-color: white;
}

.reception {
border: 2px solid white;
border-bottom-color: transparent;
border-left-color: transparent;
border-top-right-radius: 20px;
position: absolute;
}

.first-bar {
height: 6px;
width: 6px;
border-left: 0px;
top: 8px;
}

.second-bar {
height: 11px;
width: 11px;
border-left: 0px;
top: 3px;
}
<!DOCTYPE html>
<div class="player-chromecast">
<div class="broadcast">
<div class="reception first-bar"></div>
<div class="reception second-bar"></div>
</div>
</div>

请现在在 firefox 或任何其他浏览器中检查它是否正常工作我的意思是悬停时边框不存在......如果您仍然遇到相同的错误,请告诉我

关于html - Firefox 转换 :scale on hover issue,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53653122/

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