nicuf

Drop Menu Button

Feb 13th, 2022 (edited)
799
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 4.54 KB | None | 0 0
  1. -------------------
  2. EXPLANATION:
  3.  
  4. ROMANIAN: https://neculaifantanaru.com/css-drop-menu-button.html
  5. ENGLISH: https://neculaifantanaru.com/en/css-drop-menu-button.html
  6.  
  7. -------------------
  8.  
  9. <!DOCTYPE html>
  10. <html lang="en">
  11.  
  12. <head>
  13.     <meta charset="UTF-8">
  14.     <meta http-equiv="X-UA-Compatible" content="IE=edge">
  15.     <meta name="viewport" content="width=device-width, initial-scale=1.0">
  16.     <title>Button</title>
  17. </head>
  18.  
  19. <body>
  20.     <!DOCTYPE html>
  21.     <html lang="en">
  22.  
  23.     <head>
  24.         <meta charset="UTF-8">
  25.         <meta http-equiv="X-UA-Compatible" content="IE=edge">
  26.         <meta name="viewport" content="width=device-width, initial-scale=1.0">
  27.         <title>Document</title>
  28.         <link rel="stylesheet"
  29.             href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
  30.         <link rel="stylesheet" href="style.css">
  31.  
  32.     </head>
  33.  
  34.     <body>
  35.  
  36.         <div class="category-wrapper">
  37.             <div class="category-section">
  38.                 <div class="category-details-main">
  39.  
  40.  
  41.                     <div class="category-details">
  42.                         <p class="category-intro">Where does it come from?</p>
  43.                         <p class="category-intro--mobile-hidden">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled.</p>
  44.                        <ul class="category-intro--mobile-hidden">
  45.                            <li>Option 1: SU23-NUMBER</li>
  46.                            <li>Always Here Myself</li>
  47.                        </ul>
  48.                    </div>
  49.  
  50.                </div>
  51.                <a href="https://YOURLINK.com" class="button">Trimite <i class="fa fa-chevron-down icon-down"
  52.                        aria-hidden="true"></i><i class="fa fa-chevron-right icon-right" aria-hidden="true"></i></a>
  53.            </div>
  54.        </div>
  55.  
  56.    </body>
  57.  
  58.    </html>
  59.  
  60. </body>
  61.  
  62. </html>
  63.  
  64.  
  65.  
  66. ------------CSS -------------
  67.  
  68. * {
  69.    margin: 0;
  70.    padding: 0;
  71.    text-rendering: optimizelegibility;
  72. }
  73.  
  74. .category-wrapper {
  75.    background: #15202a;
  76.    max-height: 100px;
  77.    height: 100px;
  78.    display: flex;
  79.    align-items: center;
  80.  
  81.    font-family: "Source Sans Pro", 'Helvetica Neue', Helvetica, Arial, sans-serif;
  82.  
  83.  
  84. }
  85.  
  86. .category-section {
  87.    background: #15202a;
  88.    padding: 10px;
  89.    width: 230px;
  90.    box-sizing: border-box;
  91.    margin-top: 5px;
  92.    transition: 2s;
  93.        -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  94.        font-weight: 400;
  95.  
  96.  
  97. }
  98.  
  99.  
  100.  
  101. .category-details-main {
  102.    display: none;
  103. }
  104.  
  105. .category-section .category-intro {
  106.    font-weight: 700;
  107.    font-size: 15px;
  108.    color: #fff;
  109.    margin: 0;
  110.        text-shadow: 1px 1px 10px rgb(0 0 0 / 50%);
  111. }
  112.  
  113. .category-intro+p {
  114.    margin-bottom: 3px;
  115.    margin-top:8px;
  116.    line-height: 18px;
  117.        text-shadow: 1px 1px 10px rgb(0 0 0 / 50%);
  118. }
  119.  
  120. .category-section ul {
  121.    margin: 0 0 20px;
  122.    padding: 10px 0 0;
  123.    line-height: 23px;
  124.    list-style: none;
  125.    font-size: 14px !important;
  126.    list-style: none;
  127.  
  128.    font-weight: 500;
  129.        text-shadow: 1px 1px 10px rgb(0 0 0 / 50%);
  130. }
  131.  
  132. .category-section p,
  133. .category-section ul {
  134.    text-align: left;
  135.   color: RGBA(255,255,255,.75);
  136.    font-size: 11px !important;
  137. }
  138.  
  139. .category-section a.button,
  140. .category__home-button {
  141.    background: #ffc43a;
  142.  
  143.    border-radius: 3px;
  144.    display: block;
  145.    color: #2b1d00;
  146.    font-weight: 600;
  147.    margin-top: 10px;
  148.    font-size: 14px;
  149.    padding: 3px;
  150.    -webkit-box-shadow: 0 2px 2px RGBA(0, 0, 0, .95);
  151.    box-shadow: 0 2px 2px RGBA(0, 0, 0, .95);
  152.    text-align: center;
  153.    margin: 10px;
  154. }
  155.  
  156. .category-section .button {
  157.    margin: 0 !important;
  158.    text-align: center;
  159. }
  160.  
  161. .category-section a.button,
  162. .category__home-button {
  163.    padding: 10px 10px;
  164.    line-height: 20px !important;
  165. }
  166.  
  167. .category-wrapper a {
  168.    text-decoration: none;
  169. }
  170.  
  171. .category-section .icon-right {
  172.    display: none;
  173. }
  174.  
  175. .category-section:hover .icon-down {
  176.    display: none;
  177. }
  178.  
  179. .category-section:hover .icon-right {
  180.    display: inline;
  181. }
  182.  
  183. .category-section:hover .category-details-main {
  184.    display: block;
  185.  
  186.  
  187.  
  188. }
  189.  
  190. .category-section:hover {
  191.    position: relative;
  192.    top: 90px
  193. }
  194.  
  195. .category-section .category-intro {
  196.    font-weight: 700;
  197.    font-size: 14px !important;
  198.    color: #fff;
  199.    margin: 0;
  200.        line-height: 24px;
  201.    color: RGBA(255, 255, 255, 0.95);
  202. }
  203.  
Add Comment
Please, Sign In to add comment