How to use css outline-color property

青灯夜游
Release: 2019-05-28 10:06:04
Original
3006 people have browsed it

The outline is a line drawn around the element, located outside the edge of the border. The outline-color attribute is used to set the color of the visible part of the entire outline of an element. The outline-style attribute must always be declared before the outline-color attribute; an element cannot change its color until it has an outline.

How to use css outline-color property

How to use the css outline-color property?

outline-color property sets the color of the visible portion of the entire outline of an element. Remember, the outline style cannot be none, otherwise the outline will not appear.

Note:

Always declare the outline-style attribute before the outline-color attribute. The color of an element's outline can only be changed after it has obtained its outline.

Note:

outline is the margin around the element; however, it comes from a different border attribute.

The outline is not part of the element's dimensions, so the element's width and height properties do not include the width of the outline. Contours do not take up space and are not necessarily rectangular.

css outline-color property example

<!DOCTYPE>
<html>

	<head>
		<meta charset="UTF-8">
		<style type="text/css">
			p {
				border: red solid thin;
				outline-style: dotted;
				outline-color: #00ff00;
			}
		</style>
	</head>

	<body>
		<p><b>注释:</b>只有在规定了 !DOCTYPE 时,Internet Explorer 8 (以及更高版本) 才支持 outline-color 属性。</p>
	</body>

</html>
Copy after login

Rendering:

How to use css outline-color property

The above is the detailed content of How to use css outline-color property. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
css
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!