0

Kindly anyone guide me please how to make linear-gradient css border as rounded one instead of square that will support on all the browsers? Also the button background color preferred to be transparent.

.btn_outter { 
  border: 2px solid;
  border-image-source: linear-gradient(45deg, #FFF000, #000000);
  border-image-slice: 1;
  color: #000; 
}
John smith FN
  • 101
  • 1
  • 1
  • 8

1 Answers1

-1

You can try below sample

 <!DOCTYPE html>
<html>
<head>
<style>

.btn_outter { 
  border: 20px solid;
  border-image-source: radial-gradient(red, green, blue);
  border-image-slice: 20;
  color: #000; 
}
.round_div{
    border: 1px solid;
    width: max-content;
    border-radius: 30px;
    overflow: hidden;
}

</style>
</head>
<body>
<div class="round_div">
<button class="btn_outter"> button </button>
</div>
<p><strong>Note:</strong> Internet Explorer 9 and earlier versions do not support gradients.</p>
</body>
</html>
Adarsh Sharma
  • 526
  • 5
  • 11