当前位置:   article > 正文

css-两种画弧线方法_css如何画有弧度的线

css如何画有弧度的线

第一种:::after

  1. <template>
  2. <view>
  3. <view class="bg">
  4. </view>
  5. </view>
  6. </template>
  7. <style>
  8. .bg{
  9. background-color: pink;
  10. }
  11. .bg::after{
  12. content: '';
  13. position: absolute;
  14. width: 160%;
  15. height: 100px;
  16. background: skyblue;
  17. left: -30%;
  18. border-radius: 0 0 50% 50%;
  19. }
  20. </style>

第二种:border-radius

  1. <template>
  2. <view>
  3. <view class="bg">
  4. </view>
  5. </view>
  6. </template>
  7. <style>
  8. .bg{
  9. background-color: pink;
  10. border-radius:0 0 50% 50%/40%;
  11. height: 100px;
  12. width: 160%;
  13. margin-left: -30%;
  14. }
  15. </style>

 border-radius:* * /*

 border-radius:50% 50%/50%;
 height: 200px;
 width: 200px;

 

    border-radius:0 0 50% 50%/50%;
    height: 200px;
    width: 200px;

 

     border-radius:0 0 50% 50%/10%;
    height: 200px;
    width: 200px;

 

     border-radius:0 0 50% 50%/90%;
    height: 200px;
    width: 200px;

 

 

本文内容由网友自发贡献,转载请注明出处:【wpsshop博客】
推荐阅读
相关标签
  

闽ICP备14008679号