gpt4 book ai didi

html - 当我点击图像时,我在它上面放了一个滤镜,它也会影响图像的边框,我怎样才能使边框抵抗它?

转载 作者:行者123 更新时间:2023-11-28 01:20:00 24 4
gpt4 key购买 nike

代码如下:

.championlock:active {
-webkit-filter: grayscale(100%);
filter: grayscale(100%);
}

.championlock:hover {
border: 5px solid #93d3fe;
border-radius: 5px;
}

.championlock {
border: none;
overflow: hidden;
-webkit-transition-duration: 0.05s;
-moz-transition-duration: 0.05s;
-o-transition-duration: 0.05s;
-ms-transition-duration: 0.05s;
transition-duration: 0.05s;
}
<a href="trundlesupportguide.html" target="_blank"><img class="championlock" src="http://www.counter-lol.de/Trundle.png" alt="Trundle Icon" width="100%" style="max-width:62px;"></a>

我想让边框保持蓝色,我该怎么做?

http://jsfiddle.net/ow4pgyzk/

最佳答案

只需将边框设置到 a 标签(父标签)即可。

a {
display:inline-block;
}

a:hover {
border: 5px solid #93d3fe;
border-radius: 5px;
}

a img {
display:block;
}

.championlock:active {
-webkit-filter: grayscale(100%);
filter: grayscale(100%);
}

.championlock{
border: none;
-webkit-transition-duration: 0.05s;
-moz-transition-duration: 0.05s;
-o-transition-duration: 0.05s;
-ms-transition-duration: 0.05s;
transition-duration: 0.05s;
}
<a href="trundlesupportguide.html" target="_blank">
<img class="championlock" src="http://www.counter-lol.de/Trundle.png" alt="Trundle Icon" width="100%" style="max-width:62px;">
</a>

关于html - 当我点击图像时,我在它上面放了一个滤镜,它也会影响图像的边框,我怎样才能使边框抵抗它?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34290377/

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