qt into the circular button (radian)

https://blog.csdn.net/csdnluolei/article/details/83933202
border-RADIUS can be turned into a circular button, a border may be added to the arc div

border-radius rule:

Value: the value of the same four rounded corners

Two values: a first value of the upper left corner and the lower right corner, bottom left corner and top right corner of the second value

Three values: a first value of the top left, top right and bottom left is the second, the third is the lower right corner

Four values: a first value of the upper left corner, upper right corner of the second value, the third value is the lower right corner, lower left corner of the fourth value.

style:


  
  
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title> </title>
  6. <style type="text/css">
  7. .btn {
  8. width: 100px;
  9. height: 30px;
  10. background: green;
  11. border: none;
  12. color: white;
  13. margin: 6px 10px;
  14. }
  15. .btnStyle1{
  16. border-radius: 6px;
  17. }
  18. .btnStyle2{
  19. border-radius: 26px 6px;
  20. }
  21. .btnStyle3{
  22. border-radius: 6px 26px 60px;
  23. }
  24. .btnStyle4 {
  25. border-radius: 6px 126px 236px 346px;
  26. }
  27. .bolder{
  28. border: solid 1px green;
  29. width: 500px;
  30. height: 40px;
  31. border-radius: 10px;
  32. }
  33. </style>
  34. </head>
  35. <body>
  36. <div class="bolder">
  37. <button class="btn btnStyle1">按钮1 </button>
  38. <button class="btn btnStyle2">按钮2 </button>
  39. <button class="btn btnStyle3">按钮3 </button>
  40. <button class="btn btnStyle4">按钮4 </button>
  41. </div>
  42. </body>
  43. </html>

Sometimes border-radius fail

! The solution: a panacea important;

Add the border-radius property inside ! Important , let the browser of choice for the implementation of this statement

border-radius: 6px !important;
  
  

The CSS! Important are generally used for low version except iE 6, used to do the hack, back laden with! Important statement of css, so the browser of choice for the implementation of this statement, because there are inherited css styles, plus on! importanrt can override the parent's style.

Published 42 original articles · won praise 148 · views 410 000 +

Guess you like

Origin blog.csdn.net/baidu_37503452/article/details/104206239