How to create "notes" with CSS?

CSSWeb DevelopmentFront End Technology

To create ‘notes’ with CSS, the code is as follows −

 Live Demo

<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
   body{
      font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
   }
   div {
      margin-bottom: 15px;
      padding: 4px 12px;
      font-size: 18px;
   }
   .danger {
      background-color: #ffdddd;
      border-left: 6px solid #f44336;
   }
   .success {
      background-color: #ddffdd;
      border-left: 6px solid #4CAF50;
   }
   .info {
      background-color: #e7f3fe;
      border-left: 6px solid #2196F3;
   }
</style>
</head>
<body>
<h1 style="text-align: center;">Notes Example</h1>
<div class="danger">
<p><strong>Danger!</strong>Operation may damage your computer</p>
</div>
<div class="success">
<p><strong>Success!</strong> Operation has been performed successfully</p>
</div>
<div class="info">
<p><strong>Info!</strong> Need more resources to perform this operation</p>
</div>
</body>
</html>

Output

The above code will produce the following output −

raja
Published on 07-May-2020 12:21:14
Advertisements