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

用CSS的伪类实现对和叉号 #5

Open
AlexZ33 opened this issue Nov 15, 2019 · 0 comments
Open

用CSS的伪类实现对和叉号 #5

AlexZ33 opened this issue Nov 15, 2019 · 0 comments

Comments

@AlexZ33
Copy link
Owner

AlexZ33 commented Nov 15, 2019

<span class="true"></span>
.true {
    margin-right: 20px;
    display: inline-block;
    width: 8px;
    height: 4px;
    background: green;
    line-height: 0;
    font-size: 0;
    vertical-align: middle;
    transform: rotate(45deg);
}
.true:after { 
    content: '/';
    display: block;
    width: 18px;
    height: 4px;
    background: green;
}
```

测试:通过 绝对定位position: absolute;left: 11px;方式将伪类内容显示在页面上,方便测试。
注意:after伪类的内容为"/",但显示时候为""。
问题:对伪类内容添加的位置

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

No branches or pull requests

1 participant