Search
 
SCRIPT & CODE EXAMPLE
 

HTML

css: how to change SVG color when :hover on Parent element

// Example: change icon.svg color when hover on parent

// # html
<a class="parent">
    <img src="/trash.svg" alt="" class="child">
</a>
  

// # css

.parent {
  width: 60px;
  height: 60px;
  cursor: pointer;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.parent:hover {
  background-color: crimson;
}

.parent:hover .child {      /*  Change Child: SVG color when :hover on parent element  */
  filter: invert(100%) sepia(0%) saturate(0%) hue-rotate(170deg) brightness(104%) contrast(105%);
}
Comment

PREVIOUS NEXT
Code Example
Html :: alpine extract data to script tag 
Html :: html a tag not closing 
Html :: how to alert in http 
Html :: <a href:"https://Progate.com"To Progate</a 
Html :: show html 
Html :: concat dataframes r vertically 
Html :: animate image or text html 
Html :: marquee attributes 
Html :: how to do auto download when you click on a link 
Html :: mask 
Html :: vuetify html tag lang 
Html :: angular html conditional text 
Html :: months in german 
Html :: default button width in column flex direction bootstrap 
Html :: How to create web urls without extensions 
Html :: script file not working in internet explorer 
Html :: arecanut plate price in dubai by sri lankan price 
Html :: filter htmlcollection 
Html :: truncate text line clamp 
Html :: notion general mention? 
Html :: pass parameter 2 html button 
Html :: CAMBIAR COLOR AA UN ICON SGV EN HTML 
Html :: links mail 
Html :: redirect user when want to access html page 
Html :: href in spring mvc 
Html :: html role for icon 
Html :: how to run an application exe running in server and return the response in html 
Html :: how to make a page notification 
Html :: render navbar links/html link in div iframe without loading an entire page 
Html :: html select subselect 
ADD CONTENT
Topic
Content
Source link
Name
4+4 =