首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Chrome上带有::after伪元素的模糊文本

Chrome上带有::after伪元素的模糊文本
EN

Stack Overflow用户
提问于 2017-09-16 06:51:58
回答 1查看 481关注 0票数 1

https://jsfiddle.net/at5zr0ye/1/

在这个例子中,我在Chrome上遇到了模糊文本的问题。如果删除z索引,文本会变得尖锐,但在动画中,它会在::after元素下消失。

有什么想法吗?

HTML

代码语言:javascript
复制
<button id="send" type="submit">SUBMIT</button>

CSS

代码语言:javascript
复制
#send{
    z-index: 1;
    padding: 0px;
    width: 25%;
    color: rgba(0, 0, 0, 0.55);
    text-align: center;
    overflow: hidden;
    position: relative;


    -webkit-transition: .36s cubic-bezier(0.4, 0.0, 1, 1);
    -moz-transition: .36s cubic-bezier(0.4, 0.0, 1, 1);
    -ms-transition: .36s cubic-bezier(0.4, 0.0, 1, 1);
    -o-transition: .36s cubic-bezier(0.4, 0.0, 1, 1);
    transition: .36s cubic-bezier(0.4, 0.0, 1, 1);
}

#send::before{
    -webkit-font-smoothing: antialiased;
    z-index: -1;
    content: '';
    position: absolute;
    background-color: rgb(113, 113, 113);

    width: 200%;
    height: 500%;
    border-radius: 100%;

    transform: translate(-120%,20%) translateZ(0);

    -webkit-transition: .36s cubic-bezier(0.4, 0.0, 1, 1);
    -moz-transition: .36s cubic-bezier(0.4, 0.0, 1, 1);
    -ms-transition: .36s cubic-bezier(0.4, 0.0, 1, 1);
    -o-transition: .36s cubic-bezier(0.4, 0.0, 1, 1);
    transition: .36s cubic-bezier(0.4, 0.0, 1, 1);
}

#send:hover::before{
    transform: translate(-45%,-34%) translateZ(0);
}

#send:hover{
    color: rgb(255, 255, 255);
    border-color: rgba(223, 244, 245, 0.85);
}
EN

回答 1

Stack Overflow用户

发布于 2017-09-16 20:56:54

尝试添加:

-webkit-font-smoothing: antialiased;

添加到按钮属性。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/46248395

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档