Answers for "+ in css"

0

+ in css

<!-- CSS Adjacent Sibling Selector -->
<!DOCTYPE html>
<html>
<head>
   <style>
   	div + p{
       background: yellow;
       padding: 5px;
       border: 2px solid blue;
    }
   </style>
</head>
<body>
	<h1>CSS Adjacent Sibling Selector</h1>
	<div>This is a div element.</div>
    <p>This paragraph is an adjacent sibling of the div element.</p>
    <p>This paragraph is also a sibling of the div but not adjacent.</p>
</body>    
</html>
Posted by: Guest on September-05-2021

Browse Popular Code Answers by Language