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

关于fill属性在svg和css中 #98

Open
ckinmind opened this issue Feb 15, 2019 · 0 comments
Open

关于fill属性在svg和css中 #98

ckinmind opened this issue Feb 15, 2019 · 0 comments

Comments

@ckinmind
Copy link
Owner

ckinmind commented Feb 15, 2019

fill

// 正常的写法 => <path fill="#fff" ... />
.attr('fill', 'red') => <path style="fill: #fff;" ... />

// 另一种写法
.style('fill', 'red')

两种都是有效的,上面的链接中提到

This will override a presentation attribute <path fill="#fff" ... />

This will not override an inline style e.g. <path style="fill: #fff;" ... />
不是很明白这里什么意思

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