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:
xxxxxxxxxx
1
.myElement{
2
border: inset 3px red;
3
}
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:
xxxxxxxxxx
1
.myElement {
2
border-style: inset;
3
4
border-top-color: lightgreen;
5
border-left-color: lightgreen;
6
border-right-color: yellowgreen;
7
border-bottom-color: yellowgreen;
8
}
Practical example
xxxxxxxxxx
1
2
<html>
3
<head>
4
<style>
5
6
.myElement {
7
border-width: 10px;
8
border-style: inset;
9
10
border-top-color: lightgreen;
11
border-left-color: lightgreen;
12
border-right-color: yellowgreen;
13
border-bottom-color: yellowgreen;
14
}
15
16
</style>
17
</head>
18
<body>
19
<div class="myElement">some text...</div>
20
</body>
21
</html>
See also
References
0 commentsShow commentsAdd comment