<div class="border">
<p class="content">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</p>
</div>
$borderWidth: 8px; // specify border width
$backgroundColor: #222;
$borderColors: #9C27B0, #00BCD4, #28c759, #E91E63, #9C27B0, #4073ef, #FF5722, #d40074; // here you can specify border gradient colors
* {
padding: 0;
margin: 0;
box-sizing: border-box
}
body {
background-color: #DDD ;
}
.border {
position : relative ;
max-width : 800px;
padding : $borderWidth ;
margin : 50px auto;
color : #EEE ;
text-shadow: 0 0 5px #000;
box-shadow: 0 10px 30px #000;
background: linear-gradient(45deg, $borderColors);
p.content {
font-family : gotham, 'open sans', 'product sans', arial, tahoma;
padding : 20px 40px;
text-align: center ;
background-color: $backgroundColor ;
text-transform : capitalize ;
line-height: 25px;
}
}
View Compiled
/*
Gradient Border Without JS
Gradient Border Without JS
Gradient Border Without JS
*/
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.