Set the color of the four borders using CSS

CSSWeb DevelopmentFront End Technology

To set the color of the four borders, use the border-color property. You can try to run the following code to set border color for all the borders

Example

Live Demo

<!DOCTYPE html>
<html>
   <head>
      <style>
         p {
            border-style: dashed;
            border-color: #808000 #800000 #FF0000 #FFFF00;
         }
      </style>
   </head>
   <body>
      <p>This is demo text with four colored border.</p>
   </body>
</html>

Output

raja
Published on 08-May-2018 08:45:11
Advertisements