html 实践 2 - 四叶草
最编程
2024-03-23 21:27:50
...
知识点:
- border-radius:圆角设置,主要作用是设置匹配标签圆角。
它是CSS3新增的样式,其属性值写法有两种:百分比,属性值单位可以是px像素单位。
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
*{
margin: 0;
padding: 0;
}
div.box{
width: 150px;
height: 150px;
background-color: pink;
border-radius: 50%;
}
.box1{
position: relative;
width:200px;
height: 200px;
border:1px solid black;
margin: 100px auto;
}
.box1>p:nth-child(1){
position: absolute;
width:100px;
height: 100px;
background-color: cyan;
border-radius: 0px 100px 0 100px;
}
.box1>p:nth-child(2){
position: absolute;
width:100px;
height: 100px;
left: 100px;
background-color: cyan;
border-radius: 100px 0px 100px 0px;
}
.box1>p:nth-child(3){
position: absolute;
width:100px;
height: 100px;
top:100px;
background-color: cyan;
border-radius: 100px 0px 100px 0px;
}
.box1>p:nth-child(4){
position: absolute;
width:100px;
height: 100px;
left: 100px;
top: 100px;
background-color: cyan;
border-radius: 0px 100px 0 100px;
}
</style>
</head>
<body>
<div class=box></div>
<div class=box1>
<p></p>
<p></p>
<p></p>
<p></p>
</div>
</body>
</body>
</html>
原文地址:https://www.cnblogs.com/tingshu/p/14408430.html
上一篇: 图森花卉编号-1<=k<=
下一篇: 用 R 语言实现多因素偏差相关分析
推荐阅读
-
机器人系统 ros2-开发实践 04-ROS2 中 tf2 的定义和示例说明
-
设计模式学习笔记 - 项目实践 2:设计和实现通用接口闲置框架(实现) - 重构最小原型代码
-
Golang 微服务框架 Go-zero 系列-2:Go-zero + Gorm V2 实践
-
微软开源了 27 亿参数模型 Phi-2,Magic Ride 的最佳实践也在这里!
-
Video.js 教程 - 基于 Vue 构建 HTML 5 视频播放器的实践指南
-
基于 w3School 实践的自用 html 指南
-
html2canvas 与 jspdf 结合生成 pdf 内容的终极解决方案被截断
-
笛卡尔之心--一个凄美的爱情故事(含 MATLAB 3D 心形和 HTML 2D 心形代码)
-
企业大数据系统建设实践:技术、架构、实施与应用 I 第 2 章 企业大数据功能规划 2.1 大数据组织架构系统
-
Java 单元测试实践--编写方法:单元测试案例编写过程中的 Java 编程技巧 (2)