css圆角三角形3个圆角_CSS中的圆角

css圆角三角形3个圆角

CSS | 圆角 (CSS | Rounded Corners)

border-radius property is commonly used to convert box elements into circles. We can convert box elements into the circle element by setting the border-radius to half of the length of a square element.

border-radius属性通常用于将框元素转换为圆形。 通过将边框半径设置为正方形元素长度的一半,我们可以将框元素转换为圆形元素。

Basic syntax:

基本语法:

Element {
width: 150px;
height: 150px;
border-radius: 50%;
}

Example:

例:

<!DOCTYPE html>
<html>
<head>
<style>
p {
background: #73AD21;
width: 200px;
height: 150px;
border-radius: 50%
}
</style>
</head>
<body>
<h1>CSS Rounded Corners</h1>
<p></p>
</body>
</html>

Output

输出量

Rounded Corners in CSS | Example 1

In the above example, 50% border-radius is applied to all the corners.

在上面的示例中,将50%的边界半径应用于所有角。

圆角属性 (Rounded Corner properties)

  • border-radius

    边界半径

  • border-top-left-radius

    边界左上角半径

  • border-top-right-radius

    边界右上半径

  • border-bottom-left-radius

    左下半径半径

  • border-bottom-right-radius

    右下边界半径

1)边界半径 (1) border-radius)

This CSS property specifies the radius of the corners of the element. border-radius property can have values between one to four.

此CSS属性指定元素的角的半径。 border-radius属性的值可以在1-4之间。

1) One value

1)一个值

The property takes a single value to the border-radius and that value is applied to all the four corners and the corners are rounded equally.

该属性对边界半径采用单个值,并且该值应用于所有四个角,并且这些角均等地舍入。

Syntax:

句法:

Element {
border-radius: 15px;
}

2) Two values

2)两个值

This property takes two values to the border-radius. The first value is applied to top-left and bottom-right corners, the second value is applied to top-right and bottom-left corners.

此属性将两个值用作边框半径。 第一个值应用于左上角和右下角,第二个值应用于右上角和左下角。

Syntax:

句法:

Element {
border-radius: 15px 10px;
}

3) Three values

3)三个值

This property takes three values to the border-radius.The first value is applied to the top-left corner and the second value is applied to top-right and bottom-left corners, and the third value is applied to the bottom-right corner.

此属性将三个值用于边框半径。第一个值应用于左上角,第二个值应用于右上角和左下角,第三个值应用于右下角。

Syntax:

句法:

Element {
border-radius: 15px 10px 30px;
}

4) Four values

4)四个值

This property takes four values to the border-radius and applies four different values to each of the corners.The first value is applied to the top-left corner, the second value is applied to the top-right corner, the third value is applied to the bottom-right corner and the fourth value is applied to the bottom-left corner.

此属性将四个值应用于边界半径,并将四个不同的值应用于每个角。第一个值应用于左上角,第二个值应用于右上角,第三个值被应用设置为右下角,第四个值应用于左下角。

Syntax:

句法:

Element {
border-radius: 15px 10px 20px 5px;
}

边界左上角半径 (border-top-left-radius)

This property specifies the radius of the top left corner. This property takes value in length and in % where % defines the shape of the top-left corner in %.

此属性指定左上角的半径。 此属性的长度和%取值其中%定义以%表示的左上角的形状。

Syntax:

句法:

Element {
border-top-left-radius: 50%
}

Example:

例:

<!DOCTYPE html>
<html>
<head>
<style>
p {
background: #a44170;
width: 200px;
height: 150px;
border-top-left-radius: 15px;
}
</style>
</head>
<body>
<h1>CSS Rounded Corners</h1>
<p></p>
</body>
</html>

Output

输出量

Rounded Corners in CSS | Example 2

In the above example, the top-left corner is rounded.

在上面的示例中, 左上角是圆形的。

边界右上半径 (border-top-right-radius)

This property specifies the radius of the top right corner. This property takes values in length and in % where % defines the shape of the top-right corner in %.

此属性指定右上角的半径。 此属性的长度和%,其中%定义以%计的右上角的形状花费值。

Syntax:

句法:

Element {
border-top-right-radius: 50%;
}

Example:

例:

<!DOCTYPE html>
<html>
<head>
<style>
p {
background: #a44170;
width: 200px;
height: 150px;
border-top-right-radius: 15px;
}
</style>
</head>
<body>
<h1>CSS Rounded Corners</h1>
<p></p>
</body>
</html>

Output

输出量

Rounded Corners in CSS | Example 3

In the above example, the top right corner is rounded.

在上面的示例中,右上角是圆形的。

左下半径半径 (border-bottom-left-radius)

This property specifies the radius of the bottom left corner. This property takes values in length and in % where % defines the shape of the bottom-left corner in %.

此属性指定左下角的半径。 此属性的长度和%,其中%定义以%表示的左下角的形状花费值。

Syntax:

句法:

Element {
border-bottom-left-radius: 50%;
}

Example:

例:

<!DOCTYPE html>
<html>
<head>
<style>
p {
background: #a44170;
width: 200px;
height: 150px;
border-bottom-left-radius: 15px;
}
</style>
</head>
<body>
<h1>CSS Rounded Corners</h1>
<p></p>
</body>
</html>

Output

输出量

Rounded Corners in CSS | Example 4

In the above example, the bottom left corner is rounded.

在上面的示例中,左下角是圆形的。

右下边界半径 (border-bottom-right-radius)

This property specifies the radius of the bottom right corner. This property takes values in length and in % where % defines the shape of the bottom-right corner in %.

此属性指定右下角的半径。 此属性的长度和%,其中%定义以%表示的右下角的形状花费值。

Syntax:

句法:

Element {
border-bottom-right-radius: 50%;
}

Example:

例:

<!DOCTYPE html>
<html>
<head>
<style>
p {
background: #a44170;
width: 200px;
height: 150px;
border-bottom-right-radius: 15px;
}
</style>
</head>
<body>
<h1>CSS Rounded Corners</h1>
<p></p>
</body>
</html>

Output

输出量

Rounded Corners in CSS | Example 5

In the above example, the bottom right corner is rounded.

在上面的示例中,右下角是圆形的。

翻译自: https://www.includehelp.com/code-snippets/rounded-corners-in-css.aspx

css圆角三角形3个圆角

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/543877.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

iti axi dsp_ITI的完整形式是什么?

iti axi dspITI&#xff1a;工业培训学院 (ITI: Industrial Training Institute) ITI is an abbreviation of the Industrial Training Institute. It offers training in engineering and non-engineering technical fields. It is a post-secondary school in India which is…

appweb ejs_具有快速路线的EJS

appweb ejsHI! Welcome to NODE AND EJS TEMPLATE ENGINE SERIES. Today, we will see how we can work with EJS and routes? 嗨&#xff01; 欢迎使用NODE和EJS模板引擎系列 。 今天&#xff0c;我们将看到如何使用EJS和路由&#xff1f; A route is like a sub domain wit…

ups一直响是什么原因_UPS的完整形式是什么?

ups一直响是什么原因UPS&#xff1a;不间断电源 (UPS: Uninterruptible Power Supply) UPS is an abbreviation of Uninterruptible Power Supply. It operates with the support of a battery which is used to supply power in the lack of most important source or when th…

语音asr是什么意思_ASR的完整形式是什么?

语音asr是什么意思ASR&#xff1a;自动语音识别 (ASR: Automated Speech Recognition) ASR stands for Automated Speech Recognition. With the help of this technology, spoken words can be easily converted to written text. What actually it does? It gives access to…

数据库缓冲池_块缓冲| 数据库管理系统

数据库缓冲池When several blocks need to be transferred from disk to main memory and all the block addresses are known, several buffers can be reserved in main memory to speed up the transfer. 当需要将几个块从磁盘传输到主存储器并且所有块地址已知时&#xff0…

递归如何书写?

目录 第一步&#xff1a;首先你分析问题&#xff0c;要有递归的思路&#xff0c;知道要递归什么来解决问题。 第二步&#xff1a;先按照思路&#xff08;第一层&#xff09;写出函数的定义与函数体 第三步&#xff1a;根据函数的定义与函数体进一步确定需要的参数 第四步&a…

python 散点图 分类_Python | 分类图

python 散点图 分类Visualizing different variables is also a part of basic plotting. Such variables can have different classes, for example, numerical or a category. Matplotlib has an important feature of Categorical Plotting. We can plot multiple categoric…

二叉树祖先节点_二叉树的祖先

二叉树祖先节点Problem statement: 问题陈述&#xff1a; Given a Binary Tree and a target key, write a function that prints all the ancestors of the key in the given binary tree. 给定二叉树和目标键&#xff0c;编写一个函数&#xff0c;以打印给定二叉树中键的所有…

CALayer精讲

CALayer精讲 CALayer包含在QuartzCore框架中&#xff0c;这是一个跨平台的框架&#xff0c;既可以用在iOS中又可以用在Mac OS X中。后面要学Core Animation就应该先学好Layer&#xff08;层&#xff09;。 我们看一下UIView与Layer之间的关系图&#xff08;图片来源于网络&…

rofl用什么播放_ROFL的完整形式是什么?

rofl用什么播放ROFL&#xff1a;笑在地板上滚动 (ROFL: Rolling On Floor Laughing) ROFL is an abbreviation of Rolling on Floor Laughing. ROFL is a very trendy internet slang between youngsters and used in text messaging, instant messaging, chatting, and social…

gif 格式 完整 检查_GIF的完整格式是什么?

gif 格式 完整 检查GIF&#xff1a;图形交换格式 (GIF: Graphics Interchange Format) GIF is an abbreviation of Graphics Interchange Format. It is extensively used for animations and still images on the World Wide Web. The image is set out is bitmap image and i…

Java基础_05

2019独角兽企业重金招聘Python工程师标准>>> 1&#xff1a;boolean运算符号 || 与 | && 与 &的区别。 Equals与innstanceof 1&#xff1a;java中的方法。方法的定义&#xff0c;参数、返回值、调用方式。 2&#xff1a;方法调用与参数传递、Static方…

Android Studio 之下载安装

2019独角兽企业重金招聘Python工程师标准>>> 目录[-] 背景Android Studio VS Eclipse下载创建HelloWorld项目背景 相信大家对Android Studio已经不陌生了&#xff0c;Android Studio是Google于2013 I/O大会针对Android开发推出的新的开发工具&#xff0c;目前很多开…

模拟UIWebView

2019独角兽企业重金招聘Python工程师标准>>> // // ViewController.m // 模拟UIWebView // // Created by dc0061 on 15/12/10. // Copyright © 2015年 dc0061. All rights reserved. //#import "ViewController.h"interface ViewController ()&…

4g 中bis代表什么_BIS的完整形式是什么?

4g 中bis代表什么BIS&#xff1a;印度标准局 (BIS: Bureau of Indian Standards) BIS is an abbreviation of the Bureau of Indian Standards. It is the National Standard Body of India which is operating in the groundwork and execution of the standards, certificati…

Feature selection

原文:http://scikit-learn.org/stable/modules/feature_selection.html The classes in the sklearn.feature_selection module can be used for feature selection/dimensionality reduction on sample sets, either to improve estimators’ accuracy scores or to boost the…

ronald aai_AAI的完整形式是什么?

ronald aaiAAI&#xff1a;印度机场管理局 (AAI: Airport Authority of India) AAI is an abbreviation of the Airport Authority of India. It operates under the Ministry of Civil Aviation. It is in charge of creating, crafting, maintaining and enhancing the civil…

使用Eclipse-Maven-git做Java开发(13)--导入git仓库的代码到eclipse

2019独角兽企业重金招聘Python工程师标准>>> 前面讲到了怎么使用osc的git服务进行代码托管。至此&#xff0c;我们已经可以使用git进行文件的版本管理了&#xff0c;甚至可以进行不需要IDE的编程了&#xff0c;但是我们绝大多数时候还是需要IDE的&#xff0c;接下来…

python 三维图直方图_Python | 阶梯直方图

python 三维图直方图A histogram is a graphical technique or a type of data representation using bars of different heights such that each bar groups numbers into ranges (bins or buckets). Taller the bar higher the data falls in that bin. A Histogram is one o…

ExtJS4.2学习(21)动态菜单与表格数据展示操作总结篇2

运行效果&#xff1a; 此文介绍了根据操作左侧菜单在右面板展示相应内容。 一、主页 先看一下跳转主页的方式&#xff1a;由在webapp根目录下的index.jsp跳转至demo的index.jsp 下面是demo的index.jsp的代码 <% page language"java" contentType"text/html; …