当前位置:网站首页>Set SVG color
Set SVG color
2022-06-12 10:29:00 【Zi Jiao】
Set up svg Color
Code format :
<svg xmlns="" viewBox=""><path d=""></path></svg>
Method 1 ( recommend ):
svg {
fill:red;
}

--------------------------------------------------------------------------------------------------------------------------
Method 2 :
1. Create a projection using a filter , And move the projection up 100 Pixels , Set parent element overflow:hidden( If the child element overflows the parent element area, it will not be visible );
filter: drop-shadow(red 0px -100px);
2. take svg Host element and projection up 100 Pixels , here svg host Y The axis is offset out of the range of the parent element ( invisible ), The projected copy element is also moved up 100 Pixels , The coordinates are exactly svg Host location
transform: translate(0px, 100px);

summary : Method 1: less code , It's easy , And the parent element does not need to be set overflow:hidden.
边栏推荐
- Leetcode2154. 将找到的值乘以 2(二分查找)
- ASP.NET Core权限系统实战(零)
- 在一个“去QA化”的项目中,QA能做什么?
- MYSQL用户与权限管理,角色管理
- Docker compose integrates redis, MySQL and microservices, and services are containerized
- [SQLite3] memory debugging
- Find the location of a function in PHP
- 2022京東618預售定金怎麼退?京東618定金能退嗎?
- Composer command
- Global and local existence of array, integer and character variables
猜你喜欢
![[Wayland] Weston startup process analysis](/img/0e/24f374144ea7ea762a83f6598ebd48.jpg)
[Wayland] Weston startup process analysis

Raw socket usage

Redis (II) Memory mapped data structure

conda 安装tensorflow 测试tensorflow

Valentina Studio Pro for Mac(mac数据库管理软件)

4. creator mode

3. Abstract Factory
![[DDS] ddsi-rtps specification](/img/fe/16b835e3e4a8ff71ab3dbc4b9c4d2a.jpg)
[DDS] ddsi-rtps specification

properties中文乱码

How to play the 2022 Taobao 618 Super Cat Games? What are the strategies for the Super Cat Games
随机推荐
pycharm 查看opencv当前的版本
Php:redis uses geospatial
Introduction to IOT
2022京东618预售定金怎么退?京东618定金能退吗?
How to refund the pre-sale deposit of JD 618 in 2022? Can JD 618 deposit be refunded?
2. factory mode
[926. flip the string to monotonic increment]
Love and hate in the Jianghu
tp6调试(trace)
Win10 professional edition user name modification
一测两三年,记测试交流经验的一些感想
Composer command
JVM (III) Virtual machine performance monitoring & fault handling tool
Wechat payment, wechat refund, Alibaba payment
Global and local existence of array, integer and character variables
93. Obtenir toutes les adresses IP de l'Intranet
Machine learning is not something you can use if you want to use it
2022淘宝618超级喵运会玩法攻略 618超级喵运会玩法技巧
Student management system
MySQL user and permission management, role management