AgerNic.com
WEB DEVELOPER SITE, HTML, CSS, PHP, SQL

CSS rounded corners


<< Previous Page
CSS font color
Next Page >>
CSS border radius

CSS Tutorial » CSS rounded corners

CSS 3 incorporates new properties for controlling the edges of the elements.

Edges with rounded corners, image borders (even multiple images can be used to define the appearance of the border), shadows, etc. are now allowed.

We have the border-radius property, which allows defining rounded edges at the corners, specifying the radius measurements to be given to the corner curve.

Syntax:

border-*-*-radius: [ <length> | <%> ] [ <length> | <%> ]?

 

This green element has a width of 300px, a height of 150px, red border border-radius: 20px, solid, yellow marjen 10px, and centered in the center.

 

CSS rounded corners div

Un selector de ID es un identificador único del elemento HTML al que se debe aplicar un estilo en particular. Se usa solo cuando un solo elemento HTML en la página web debe tener un estilo específico.

Tanto en las hojas de estilo internas como en las externas, usamos hash (#) para un selector de id.

Example
<!DOCTYPE html>
<html>
<head>
<style>
#corner1 {
border-radius: 25px;
padding: 20px;
width: 200px;
height: 150px;
background-color: #C6EB94;
}
#corner2 {
border-radius: 25px;
border: 2px solid #73AD21;
padding: 20px;
width: 200px;
height: 150px;
}
.corner3 {
border-radius: 25px;
background: url(https://www.agernic.com/uploads/paper.gif);
background-position: left top;
background-repeat: repeat;
padding: 20px;
width: 200px;
height: 150px;
}
</style>
</head>
<body>
<h1>The border-radius property</h1>
<p>Rounded corners for an element with a specific background color:</p>
<p id="corner1">Rounded corners! for paragraph<br />
<strong>border-radius: 25px; </strong></p>
<p>Rounded corners for an element with a border:</p>
<div id="corner2">Rounded corners!<br />
<strong>border-radius: 25px;<br />
div id
</strong></div>
<p>Rounded corners for an element with a background image:</p>
<div class="corner3">Rounded corners!<br />
<strong>border-radius: 25px;<br />
div class background image
</strong></div>
</body>
</html>

Tags: css esquinas redondeadas, redondas, redondear esquina imagen, css dorder esqinas redondeadas, div esquinas redondeadas, cuadros con esquina redondeadas, esquinas rectas, html css tablas esquinas redondeadas, css3

 

Creating CSS rounded corners image

The border-image property allows you to specify an image to act as an element's border.

In the case that we want to place rounded or round edges in an image or several images we can apply everything seen above, only that this time the CSS would be directed to the image:

Example
<!DOCTYPE html>
<html>
<head>
<style>
#corner_img1 {
background: url(https://www.agernic.com/uploads/paper.gif);
border-radius: 50px;
height: 200px;
width: 200px;
}
#corner_img2 {
background: url(https://www.agernic.com/uploads/paper.gif);
width:250px;
height:250px;
border-radius:50%;
overflow:hidden;
}
.corner_img3 {
border-radius: 25px;
background: url(https://www.agernic.com/uploads/paper.gif);
background-position: left top;
background-repeat: repeat;
padding: 20px;
width: 200px;
height: 150px;
}
</style>
</head>
<body>
<h1>The border-radius property</h1>
<p>Rounded corners for an element with a specific background color:</p>
<p id="corner_img1">Rounded corners! for paragraph<br />
<strong>border-radius: 25px; </strong></p>
<p>Rounded corners for an element with a border:</p>
<div id="corner_img2">Rounded corners!<br />
by adding a parent div to your img and the code flows as follows
</strong></div>
<p>Rounded corners for an element with a background image:</p>
<div class="corner_img3">Rounded corners!<br />
<strong>border-radius: 25px;<br />
div class background image
</strong></div>
</body>
</html>

 

How to create a Button with CSS Rounded Corners

Make a CSS Button with Rounded Corners

Every button you click on the web, they are all created with HTML and Designed by CSS. CSS allows designing your own customized button as you need. In this tutorial, we will create a customized CSS button with Rounded Corner.

Ejemplo

<!DOCTYPE html>
<html>
<head>
<style>
button.mbtn {
padding:0.6em 2em;
border-radius: 8px;
color:#fff;
background-color:#1976d2;
font-size:1.1em;
border:0;
cursor:pointer;
margin:1em;
}

button.mbtn.green
{
background-color:#2e7d32;
}

button.mbtn.red
{
background-color:#c62828;
}
</style>
</head>
<body>
<h1>The button border-radius property</h1>
<button class="mbtn blue">Button</button>

<button class="mbtn green">Proceed</button>

<button class="mbtn red">Delete</button>
</body>
</html>

 



Etiquetas: css rounded corners, image, div, button, table, top only, on one side, bottom only, percentage
CSS rounded corners - css tutorial

Online Editor
ONLINE EDITOR

news templates


COLOR PICKER

news templates
This tool makes it easy to create, adjust, and experiment with custom colors for the web.


HTML Templates
news templates
Magnews2 is a modern and creative free magazine and news website template that will help you kick off your online project in style.


CSS HTML Layout
news templates
Find here examples of creative and unique website layouts.


Free CSS HTML Menu
news templates
Find here examples of creative and unique website CSS HTML menu.


CSS Scrollbar Horizontal
CSS Scrollbar in Div
CSS Scrollbar Firefox
CSS Style Scrollbar
CSS Style Text
CSS background color
CSS Div Id Class
CSS Text Wrap
CSS text-align
CSS Text Decoration
CSS Text Shadow
CSS Text Color
CSS Text Bold
CSS Text Size
CSS background image full
CSS background opacity
CSS border radius
CSS rounded corners
CSS font color
CSS Class & ID
CSS align image center
CSS align content
CSS link color
CSS Text Style
CSS Text Font Size
CSS max width &height
CSS width and height
CSS Margin
CSS Padding
CSS Border Style
CSS background
CSS in HTML
Basic Syntax of CSS
CSS Introduction
Online Editor
ONLINE EDITOR

news templates


COLOR PICKER

news templates
This tool makes it easy to create, adjust, and experiment with custom colors for the web.


HTML Templates
news templates
Magnews2 is a modern and creative free magazine and news website template that will help you kick off your online project in style.


CSS HTML Layout
news templates
Find here examples of creative and unique website layouts.


Free CSS HTML Menu
news templates
Find here examples of creative and unique website CSS HTML menu.


Upload Image, display, edit and delete i...
Login Form with Image background...
How to Create an Image with Transparent ...
Portfolio Gallery Website with filtering...
Simple pagination script PHP MySQLi...
Center Image in div...
Image Hover Overlay Fade...
Sticky image / element / div on scroll...
Responsive images...
Create rounded image in HTML CSS...
Add border around image...
Position Text Over an Image HTML CSS res...
Create a Slideshow Images Gallery...
Create a Sticky Sidebar...
Search bar using CSS HTML...
Shrink Navigation Menu on Scroll...
How to Create Accordion HTML Templates...
Dropdown menu in the navigation bar...
Responsive Top Navigation Bar with mobil...
Split horizontal navigation bar...