Home Web Front-end CSS Tutorial How to use css border-top-right-radius property

How to use css border-top-right-radius property

May 27, 2019 pm 02:12 PM

How to use css border-top-right-radius property

border-top-right-radius attribute definition and usage

In css, the border-top-right-radius attribute is used to The border in the upper right corner of the element is set to a rounded border (it can also be in other shapes). This attribute is generally used when the upper right corner is set to be rounded separately; if we want to set the four corners of the element to be rounded at the same time, of course we can Use this attribute and three other attributes similar to this attribute (see similar attributes below), but we generally choose the border-radius attribute. The border-radius attribute can define the settings of the four corners in the same statement, so it can be omitted. A few lines of code and better readability.

border-top-right-radius property is similar to properties

1.border-top-left-radius property: Set the upper left corner to a rounded corner or other shape;

2.border-bottom-left-radius property: Set the lower left corner to a rounded corner or other shape;

3.border-bottom-right-radius property: Set the lower right corner to a rounded corner or Other shapes;

border-top-right-radius attribute syntax format

1.css syntax: border-top-right-radius:5px 10px

2.css syntax: border-top-right-radius:6px

3.css syntax: border-top-right-radius:30% 80%

4.css syntax: border-top-right-radius:50%

5.JavaScript syntax: object.style.borderTopRightRadius="5px"

border-top-right-radius attribute value description

The border-top-right-radius attribute has two attribute values. If the two attribute values ​​are the same, you can omit one attribute value and the effect will be exactly the same. When there are two attribute values: the first attribute value represents the horizontal radius of the upper right corner shape, and the second attribute value represents the vertical radius; when there is only one attribute value: the attribute value represents the horizontal radius and vertical radius of the upper right corner shape .

Example

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>css border-top-right-radius属性将右上角设置为圆角边框</title>
<style type="text/css">
body{background: #ddd;font-size:20px;}
#a,#b,#c{margin-top:10px;width:360px;border:2px solid #0000FF;padding: 16px;}
#a{border-top-right-radius:56px 36px;}
#b{border-top-right-radius:60px;}
#c{border-top-right-radius:20% 80%;}
</style>
</head>
<body>
<div id = "a">border-top-right-radius:56px 36px;</div>
<div id = "b">border-top-right-radius:60px;</div>
<div id = "c">border-top-right-radius:20% 80%;</div>
</body>
</html>
Copy after login

Run result

How to use css border-top-right-radius property

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

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Create a JavaScript Contact Form With the Smart Forms Framework Create a JavaScript Contact Form With the Smart Forms Framework Mar 07, 2025 am 11:33 AM

Create a JavaScript Contact Form With the Smart Forms Framework

Adding Box Shadows to WordPress Blocks and Elements Adding Box Shadows to WordPress Blocks and Elements Mar 09, 2025 pm 12:53 PM

Adding Box Shadows to WordPress Blocks and Elements

Demystifying Screen Readers: Accessible Forms & Best Practices Demystifying Screen Readers: Accessible Forms & Best Practices Mar 08, 2025 am 09:45 AM

Demystifying Screen Readers: Accessible Forms & Best Practices

Create an Inline Text Editor With the contentEditable Attribute Create an Inline Text Editor With the contentEditable Attribute Mar 02, 2025 am 09:03 AM

Create an Inline Text Editor With the contentEditable Attribute

Working With GraphQL Caching Working With GraphQL Caching Mar 19, 2025 am 09:36 AM

Working With GraphQL Caching

Making Your First Custom Svelte Transition Making Your First Custom Svelte Transition Mar 15, 2025 am 11:08 AM

Making Your First Custom Svelte Transition

Comparing the 5 Best PHP Form Builders (And 3 Free Scripts) Comparing the 5 Best PHP Form Builders (And 3 Free Scripts) Mar 04, 2025 am 10:22 AM

Comparing the 5 Best PHP Form Builders (And 3 Free Scripts)

File Upload With Multer in Node.js and Express File Upload With Multer in Node.js and Express Mar 02, 2025 am 09:15 AM

File Upload With Multer in Node.js and Express

See all articles