¿Fue útil?

Pregunta

How to create different dividers with CSS?

CSSWeb DevelopmentFront End Technology

To create different dividers with CSS, the code is as follows −

Example

 Live Demo

<!DOCTYPE html>
<html>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<head>
<style>
   body {
      font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
   }
   .dashed {
      border-top: 3px dashed rgb(216, 22, 22);
   }
   .dotted {
      border-top: 3px dotted rgb(8, 11, 167);
   }
   .solid {
      border-top: 3px solid rgb(18, 167, 38);
   }
   .rounded {
      border-top: 8px solid rgb(200, 255, 0);
      border-radius: 5px;
   }
   .double {
      border-top: 3px double rgb(219, 46, 196);
   }
</style>
</head>
<body>
<h1>Dividers Example</h1>
<p>Dashed</p>
<hr class="dashed" />
<p>Dotted</p>
<hr class="dotted" />
<p>Solid</p>
<hr class="solid" />
<p>Rounded</p>
<hr class="rounded" />
<p>Double</p>
<hr class="double" />
</body>
</html>

Output

The above code will produce the following output −

raja
Published on 12-May-2020 14:08:29
Advertisements
¿Fue útil?
No afiliado a Tutorialspoint
scroll top