Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Selected Reading
Set outline style as ridge with CSS
To set the outline style as ridge, use the outline-style property with the value ridge. The ridge outline creates a 3D raised effect that appears to protrude from the page surface, opposite to the groove style which looks carved into the page.
Syntax
selector {
outline-style: ridge;
}
Example
The following example demonstrates how to apply a ridge outline style to a paragraph −
<!DOCTYPE html>
<html>
<head>
<style>
.ridge-outline {
outline-width: 3px;
outline-style: ridge;
outline-color: #333;
padding: 15px;
margin: 20px;
background-color: #f0f0f0;
}
</style>
</head>
<body>
<p class="ridge-outline">
This text has a 3px ridge outline that creates a raised 3D effect around the paragraph.
</p>
</body>
</html>
A paragraph with gray background and a 3D raised ridge outline appears on the page. The outline creates a border that looks like it's protruding from the surface.
Conclusion
The outline-style: ridge property creates an attractive 3D raised border effect. Combine it with outline-width and outline-color for complete outline styling.
Advertisements
