css的border-radius注意点

时间:2022-07-28
本文章向大家介绍css的border-radius注意点,主要内容包括其使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。
<!DOCTYPE html>
<html>
<head>
	<title></title>
	<style type="text/css">
		 *{
            margin: 0;
            padding: 0;
        }
        .one
        {
        	width: 200px;
        	height: 200px;
        	border: 1px solid red;
        	box-sizing: border-box;
        	margin: 100px auto;
        	border-radius: 100px 50px 100px;
        	/*当省略了某一个角的值之后, 系统会自动参考对角的值*/
        }
        .two
        {
        	width: 200px;
        	height: 200px;
        	border: 50px solid black;
        	box-sizing: border-box;
        	margin:100px auto;
        	/*border-radius: 40px;*/
        	/*当边框圆角的值 > 边框宽度的时候, 外边框和内边框都会变成圆角
              当边框圆角的值 <= 边框宽度的时候, 外边框是圆角, 内边框是直角*/
              border-radius: 70px;
        }
	</style>
</head>
<body>
<div class="one"></div>
<div class="two"></div>
</body>
</html>