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

关于属性选择符的说明 #40

Closed
readyou opened this issue Dec 19, 2014 · 2 comments
Closed

关于属性选择符的说明 #40

readyou opened this issue Dec 19, 2014 · 2 comments

Comments

@readyou
Copy link

readyou commented Dec 19, 2014

关于E[att|="val"]的说明好像有点小问题:
原描述:选择具有att属性且属性值为以val开头并用连接符"-"分隔的字符串的E元素。
实际上应该是:属性值为val(-\w+)*,连接符"-"不是必须的。

@doyoe
Copy link
Owner

doyoe commented Jan 28, 2015

应该分开来说,假设有如下例子:

li[class|="a"]{color:#f00;}

<div class="a">1</a>
<div class="ab">2</a>
<div class="a-b">3</a>

将会命中 1,3 这两个节点,2被跳过,如果以白话一点的描述,应该说成是:选择具有att属性且属性值为以val开头并用连接符"-"分隔的字符串的E元素,如果属性值仅为val,也将被选择。

@doyoe
Copy link
Owner

doyoe commented Jan 28, 2015

将在 v4.1.6 中修订,谢谢反馈

@doyoe doyoe closed this as completed Jan 21, 2016
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

2 participants