clip_mask.rml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <rml>
  2. <head>
  3. <title>Clip mask</title>
  4. <link type="text/rcss" href="../style.rcss"/>
  5. <meta name="Description" content="Clipping with border-radius should clip along its curved, inner border. Requires clip mask support in the renderer, commonly implemented using a stencil buffer." />
  6. <style>
  7. .clip {
  8. overflow: hidden;
  9. }
  10. handle {
  11. top: auto;
  12. right: auto;
  13. bottom: auto;
  14. left: auto;
  15. width: auto;
  16. height: auto;
  17. display: block;
  18. position: relative;
  19. cursor: move;
  20. }
  21. .box {
  22. margin: 20dp auto;
  23. position: relative;
  24. width: 250dp;
  25. border-color: #55f;
  26. border-width: 20dp;
  27. border-radius: 150dp;
  28. }
  29. .A {
  30. height: 70dp;
  31. background: #ffd34f;
  32. border: 5dp #f57;
  33. }
  34. .B {
  35. left: 50%;
  36. background: #ffd34f;
  37. border: 5dp #f57;
  38. border-radius: 25dp;
  39. }
  40. .C {
  41. width: 50%;
  42. top: 50dp;
  43. margin: 10dp auto;
  44. height: 30dp;
  45. background: #d3ff4f;
  46. border: 5dp #3a4;
  47. border-radius: 50dp;
  48. }
  49. </style>
  50. </head>
  51. <body>
  52. <div class="box clip">
  53. Duck aloft
  54. <handle move_target="#self" class="A" edge_margin="-70%">
  55. A
  56. </handle>
  57. X
  58. </div>
  59. <div class="box clip">
  60. Y
  61. <handle move_target="#self" class="B clip" edge_margin="-70%">
  62. C
  63. <handle move_target="#self" class="C clip" edge_margin="-70%">
  64. Some long text
  65. </handle>
  66. Z
  67. </handle>
  68. W
  69. </div>
  70. </body>
  71. </rml>