详解: 23 border-radius以border为基点(变化点)

核心: border-radius: 60px 40px 20px 10px /30px 20px 10px 5px;是什么?
/第一个是60 30是左上角把,是水平60垂直30.。/
依次比较
border-radius: 40px;代表什么?
代表左上角 右上角 右下角 左下角四个都水平垂直为40px。
border-width: 20px 30px 0px 50px;代表上 右 下 左哈
border-color: pink blue pink blue;代表上 右 下 左哈
核心在于最核心来了
都是以border为基点的哈因为它叫做border-radius嘛是吧

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        #container div
        {
            width: 100px;
            height: 100px;
            border: 3px solid red;
            background-color: red;
            margin: 10px;
        }
        .box1
        {
            border-radius: 60px 40px 20px 10px /30px 20px 10px 5px;
        }/*第一个是60 30是左上角把,是水平60垂直30.。*/
        #container .box2
        {
            border: 20px solid red;
            border-radius: 40px;
        }
        #container .box3
        {
           
            border-style: solid;
            border-width: 20px 30px 0px 50px;
            border-color: pink blue red blue;
        }
        #container .box4
        {
            width: 500px;
            height: 100px;
            border-style: solid;
            border-width: 60px 30px 60px 30px;        
            border-color: pink blue pink blue;
        }
        #container img
        {
            width: 150px;
            height: 150px;
            border: 5px solid red;
            border-radius: 20px;
        }
    </style>
</head>
<body>
    <div id="container">
        <div class="box1"></div>
        <div class="box2"></div>
        <div class="box3"></div>
        <div class="box4"><img src="./1.jpg"></div>
    </div>
</body>
</html>

在这里插入图片描述

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

贵哥的编程之路(热爱分享)

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值