Search
 
SCRIPT & CODE EXAMPLE
 

CSS

hover effect on sibling element tailwind

/* Mark the sibling with the 'peer' class
Now you can use 'peer-focus', 'peer-hover',.. to style the target element

https://tailwindcss.com/docs/hover-focus-and-other-states#styling-based-on-sibling-state
*/
<div>
	<div class='peer'>Some Div</div>
	<div class='peer-hover:bg-rose-300 peer-focus:bg-white'>
		Another Div
	</div>
</div>
Comment

PREVIOUS NEXT
Code Example
Css :: css text vertical spacing 
Css :: tailwindcss cli with custom config file name 
Css :: line break inside content css 
Css :: set distance between text and underline 
Css :: text overflow ellipsis two lines 
Css :: nth-child() css 
Css :: css div overlay div 
Css :: how to make slideshow not go over navigation bar 
Css :: text opacity css 
Css :: css first h element 
Css :: how to change paragraph text color to orange - css 
Css :: css cut text of 
Css :: text area focus css 
Css :: 3d button 
Css :: scss hover 
Css :: css background color over image 
Css :: dom ids have numbers 
Css :: css selection 
Css :: adding border to text css 
Css :: vertical align span tailwindscss 
Css :: background size in css 
Css :: zoom animations in css 
Css :: scale up and scale down animation in css 
Css :: css animation properties 
Css :: How to horizontally center an element 
Css :: css grid no stretch 
Css :: css border different sides 
Css :: css animate border bottom on hover 
Css :: css horizontal gradient background color 
Css :: input padding without changing width 
ADD CONTENT
Topic
Content
Source link
Name
1+2 =