实例 HTML 颜色 currentcolor 关键字实例

x
 
<!DOCTYPE html>
<html>
<head>
<style>
#myDIV {
  color: blue;
  border: 10px solid currentcolor;
}
</style>
</head>
<body>
<h2>The currentcolor Keyword</h2>
<p>The currentcolor keyword refers to the value of the color property of an element.</p>
<p>The border color of the following div element will be blue, because the text color of the div element is blue:</p>
<div id="myDIV">
This div element has a blue text color and a blue border.
</div>
</body>
</html>
                    

输出结果