Advertisement
1xptolevitico69

Basic essay about border-radius

Jul 3rd, 2019
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.70 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang=en>
  3. <head>
  4. <title></title>
  5. <meta charset=utf-8>
  6. <meta name="viewport" content="width=device-width">
  7. <style>
  8.  
  9. #txt3{
  10. width:600px;
  11. font-size:25px;
  12. padding:10px 20px;
  13. color:maroon;
  14. border:10px solid red;
  15. outline:none;
  16. border-top:0;
  17. }
  18. #txt2{
  19. width:600px;
  20. font-size:25px;
  21. padding:10px 20px;
  22. color:maroon;
  23. border:10px solid red;
  24. outline:none;
  25. border-bottom:10px solid transparent;
  26. border-top:10px solid transparent;
  27. border-radius:50px;
  28. }
  29. #txt1{
  30. width:600px;
  31. font-size:25px;
  32. padding:10px 20px;
  33. color:maroon;
  34. border:10px solid red;
  35. outline:none;
  36. border-width:0 10px 0 10px;
  37. border-radius:50px;
  38. }
  39. input{
  40. width:600px;
  41. margin:50px;
  42. display:block;
  43. }
  44. #txt{
  45. width:600px;
  46. font-size:25px;
  47. padding:10px 0;
  48. color:red;
  49. border:5px solid green;
  50. outline:none;
  51. text-align:center;
  52. border-radius:50px;
  53. }  
  54.  
  55. // border-radius:50px;  same as border-radius:50px 50px 50px 50px;
  56. // 4 parameters: top left, top right, bottom right, bottom left ( clockwise )
  57.  
  58. </style>
  59. </head>
  60. <body>
  61.  
  62. <input id='txt' type='text' placeholder='Pls move slider'/>
  63. <input id='range' oninput='change()' type='range' value='0'/>
  64.  
  65. <input id='txt1' type='text' placeholder='Pls move slider'/>
  66. <input id='range1' oninput='display()' type='range' value='0'/>
  67.  
  68. <input id='txt2' type='text' placeholder='Type...'/>
  69.  
  70. <input id='txt3' type='text' placeholder='Type...'/>
  71.  
  72.  
  73.  
  74. <script>
  75.  
  76. function change(){
  77. txt.value=range.value;
  78. txt.style.width=range.value*6+'px';
  79. }
  80. function display(){
  81. txt1.value=range1.value;
  82. if(range1.value > 50){
  83. txt1.style.textAlign='center';
  84. txt1.style.color='blue';
  85. }else{
  86. txt1.style.textAlign='left';
  87. txt1.style.color='red';
  88. }
  89.  
  90. }
  91.  
  92. </script>
  93. </body>
  94. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement