complex-border.uvue 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <template>
  2. <view style="flex-grow: 1;">
  3. <view>
  4. <text>圆角 : 各边之间 不同width && 不同颜色 && 不同圆角</text>
  5. <view style="width: 250px;height: 250px;background-color: gray;justify-content: center;align-items: center;">
  6. <view class="border-circle"></view>
  7. </view>
  8. </view>
  9. <view>
  10. <text>直角 : 各边之间 不同width && 不同颜色 </text>
  11. <view style="width: 250px;height: 250px;background-color: gray;justify-content: center;align-items: center;">
  12. <view class="border-rect"></view>
  13. </view>
  14. </view>
  15. </view>
  16. </template>
  17. <script>
  18. </script>
  19. <style>
  20. .common {
  21. width: 250px;
  22. height: 250px;
  23. background-color: gray;
  24. }
  25. .border-circle {
  26. width: 125px;
  27. height: 125px;
  28. background-color: #00dd00;
  29. border-width: 10px;
  30. border-style: solid;
  31. border-color: #000000;
  32. border-bottom-width: 20px;
  33. border-bottom-color: #ff0000;
  34. border-bottom-right-radius: 25px;
  35. border-bottom-left-radius: 15px;
  36. border-radius: 5px;
  37. border-right-color: #FFDC02;
  38. }
  39. .border-rect {
  40. width: 125px;
  41. height: 125px;
  42. border-style: solid;
  43. background-color: #00dd00;
  44. border-width: 10px;
  45. border-color: #000000;
  46. border-bottom-width: 20px;
  47. border-bottom-color: #ff0000;
  48. border-right-color: #FFDC02;
  49. }
  50. </style>