学习前端遇到的问题6: 这两段关于border-radius的设置有什么不同呢?
div {
width: 200px;
height: 200px;
background: #fb3;
margin-bottom: 20px;
}
.test-1 {
border-radius: 50% 50% 0 0 / 100%;
}
.test-2 {
border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
结果
第一个设置border-radius: 50% 50% 0 0 / 100%;
为下面设置的一个缩写
border-top-left-radius: 50% 100%;
border-top-right-radius: 50% 100%;
border-bottom-right-radius: 0px 100%;
border-bottom-left-radius: 0px 100%;
第二个设置border-radius: 50% 50% 0 0 / 100% 100% 0 0;
为下面设置的一个缩写
border-top-left-radius: 50% 100%;
border-top-right-radius: 50% 100%;
border-bottom-right-radius: 0px 0px;
border-bottom-left-radius: 0px 0px;
两者不同的在于:
border-bottom-right-radius: 0px 100%;
border-bottom-left-radius: 0px 100%;
border-bottom-right-radius: 0px 0px;
border-bottom-left-radius: 0px 0px;
这两者产生的效果的难道不是一样的么?为什么最后的效果不一样呢?