相关疑难解决方法(0)

CSS Comparison Operators

I need to target divs that takes up more than 80% of their parent div, for a progress bar. Considering that we can target a specific width with CSS:

[data-width=80]
Run Code Online (Sandbox Code Playgroud)

How might we target a comparison? This did not work in Firefox or Chrome:

[data-width>=80]
Run Code Online (Sandbox Code Playgroud)

A google search for css comparison operators surprisingly did not turn up anything useful or relevant.

Note that I am targeting a data-* property, which I set together when setting the width in Javascript. …

css css-selectors

3
推荐指数
1
解决办法
1578
查看次数

标签 统计

css ×1

css-selectors ×1