Skip to content

Commit 80bffd6

Browse files
committed
Update both the workaround for CSS fill color which contains opacity
1 parent e1cef81 commit 80bffd6

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

README.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,10 +168,19 @@ if svgImage.sd_isVector { // This API available in SDWebImage 5.6.0
168168

169169
## Compatibility for CoreSVG framework
170170

171-
1. The CSS `opacity` can not been applied for `path`, like this:
172-
```html
173-
<path d="M399.8,68.2c77.3,3.1,160.6,32.1" opacity="0.5" />
174-
```
171+
#### The CSS `opacity` can not been applied for `path` which contains `fill` color
172+
173+
+ Example
174+
175+
```html
176+
<path d="M399.8,68.2c77.3,3.1,160.6,32.1" opacity="0.15" fill="rgb(29,36,60)" />
177+
```
178+
179+
+ Workaround: Use CSS `rgba` to set the opacity instead.
180+
181+
```html
182+
<path d="M399.8,68.2c77.3,3.1,160.6,32.1" fill="rgba(29,36,60,0.15)" />
183+
```
175184

176185
## Backward Deployment
177186

0 commit comments

Comments
 (0)