border-radius.uvue 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <template>
  2. <!-- #ifdef APP -->
  3. <scroll-view style="flex: 1">
  4. <!-- #endif -->
  5. <view style="flex-grow: 1">
  6. <view>
  7. <text>border-radius: 10px</text>
  8. <view class="common" style="border-radius: 10px"></view>
  9. </view>
  10. <view>
  11. <text>border-top-left-radius: 10px</text>
  12. <view class="common" style="border-top-left-radius: 10px"></view>
  13. </view>
  14. <view>
  15. <text>border-top-right-radius: 10px</text>
  16. <view class="common" style="border-top-right-radius: 10px"></view>
  17. </view>
  18. <view>
  19. <text>border-bottom-left-radius: 10px</text>
  20. <view class="common" style="border-bottom-left-radius: 10px"></view>
  21. </view>
  22. <view>
  23. <text>border-bottom-right-radius: 10px</text>
  24. <view class="common" style="border-bottom-right-radius: 10px"></view>
  25. </view>
  26. <view>
  27. <text>border-radius: 250px(与长宽相同形成正圆)</text>
  28. <view class="common" style="border-radius: 250px"></view>
  29. </view>
  30. <view>
  31. <text>border-radius: 10px(包含子视图)</text>
  32. <view class="common" style="margin-left: 5px;border-radius: 10px">
  33. <view style="background-color: wheat;width: 100%;height: 20px;"></view>
  34. </view>
  35. </view>
  36. <view style="margin-top: 10px;">
  37. <text>border-bottom-left-radius: 10px \nborder-bottom-right-radius: 10px \n(包含子视图)</text>
  38. <view class="common" style="margin-left: 5px;border-top-left-radius: 10px;border-top-right-radius: 10px">
  39. <view style="background-color: wheat;width: 100%;height: 20px;"></view>
  40. </view>
  41. </view>
  42. </view>
  43. <!-- #ifdef APP -->
  44. </scroll-view>
  45. <!-- #endif -->
  46. </template>
  47. <style>
  48. .common {
  49. width: 250px;
  50. height: 250px;
  51. background-color: gray;
  52. }
  53. </style>