Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

「评论」字体特效 #145

Open
dongyuanxin opened this issue Jul 17, 2019 · 3 comments
Open

「评论」字体特效 #145

dongyuanxin opened this issue Jul 17, 2019 · 3 comments

Comments

@dongyuanxin
Copy link
Owner

字体特效:https://xin-tan.com/passages/2019-07-16-font-animation/

@Unicorn-NightFury
Copy link

前辈你好,我想请教一下你的字体特效里的第一个划线动态特效。里面给::before和::after都设置left:0和right:0的作用是什么?是将内容强行拉为100%吗。可这样不会涉及left和right权重问题吗?着实想不通,动手实践了也没琢磨出道道。上网查也查不出答案,所以只能冒昧打扰前辈了,还请前辈指导一下,谢谢

@dongyuanxin
Copy link
Owner Author

@Unicorn-NightFury

absolute下,left和right设置为0,会自动横向延伸铺满;同理,top和bottom设置为0,纵向会铺满。
理解起来的话,就是距离left和right距离都为0,那么只能横向铺满。

@Unicorn-NightFury
Copy link

@dongyuanxin

@Unicorn-NightFury

absolute下,left和right设置为0,会自动横向延伸铺满;同理,top和bottom设置为0,纵向会铺满。
理解起来的话,就是距离left和right距离都为0,那么只能横向铺满。

懂了,谢谢前辈。是只有absolute这种情况下才可以是吗?我用relative试了下好像不行

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants