EN
CSS - control two colors of inset / outset border?
1
answers
0
points
Is there any way to change the two colors of the inset / outset border in CSS?
I need something that will change the inset style, like:
.myElement{
border: inset 3px red;
}
or anything that can control how dark the alternate shade is.
1 answer
0
points
I don't think there's a way to control it like you described. However, you can change the individual color of each border:
.myElement {
border-style: inset;
border-top-color: lightgreen;
border-left-color: lightgreen;
border-right-color: yellowgreen;
border-bottom-color: yellowgreen;
}
Practical example
// ONLINE-RUNNER:browser;
<!doctype html>
<html>
<head>
<style>
.myElement {
border-width: 10px;
border-style: inset;
border-top-color: lightgreen;
border-left-color: lightgreen;
border-right-color: yellowgreen;
border-bottom-color: yellowgreen;
}
</style>
</head>
<body>
<div class="myElement">some text...</div>
</body>
</html>
See also
References
0 comments
Add comment