Search
 
SCRIPT & CODE EXAMPLE
 

CSS

simple button css codepen

$yellow: #fff000
$blue: #007bff
$white: #fff
$black: #000

body
  margin: 0

section
  position: relative
  background: $black
  height: 100vh
  display: flex
  align-items: center

  .btn-link
    display: inline-block
    position: relative
    padding:  15px 20px
    background: $yellow
    color: #000
    font-size: 18px
    text-align: center
    text-decoration: none
    font-weight: 700
    margin: 0 auto 20px
    border-radius: 25px
    transition: all 0.25s ease-in
    z-index: 1
    &:after
      content: ''
      position: absolute
      top: 0
      left: 0
      right: 0
      bottom: 0px
      background: $yellow
      z-index: -1
      border-radius: 25px
      transition: all 0.25s ease-in
    &:hover
      color: #fff
      background: $blue 
      text-decoration: none 
      &:after
        bottom: -5px
        background: $blue
        opacity: 0.75
    &:active
      color: #fff
      text-decoration: none
      background: $blue
      transform: translateY(5px)
      &:after
        bottom: 0px

<section>
  <a class="btn-link">hover and click here</a>
</section>
Comment

PREVIOUS NEXT
Code Example
Css :: How to write something inside image 
Css :: Curve Text Around a Floated Image 
Css :: showing danger message in red in terminal bash 
Css :: twig language name 
Css :: -webki slider runnable track 
Css :: More examples and patterns in scrapy 
Css :: how to disable margin collapse between parent and child 
Css :: scss add class to body 
Css :: fill div on hover 
Css :: skip main content - keyboard accessible buttons on navbar - css 
Css :: var units = "years"; var davidAge = 65; var johnAge = 40; var ageDifference = davidAge - johnAge; alert("The age difference is " + ageDifference + " " + units); 
Css :: responsive header with logo and menu css code 
Css :: #shadow-root (open) css 
Css :: inexorably 
Css :: order 
Css :: css validation 
Css :: css div background image loading 
Css :: Drupal 8 Notice: Trying to get property 
Css :: tailwind no wrap 
Css :: css selector match class 
Css :: use clamp in scss 
Css :: access is denied nul server.js 
Css :: CSS menu list with underline hover animation 
Css :: easyui datagrid header multiline 
Css :: what is text-justify in css 
Css :: webkit scrollbar padding 
Typescript :: how to remove list dots in li bootstrap 
Typescript :: Cannot preload , value of is undefined  
Typescript :: json-server : File C:UsersROUSHAN SHARMAAppDataRoaming pmjson-server.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see 
Typescript :: how to make an element be above all the other elements html 
ADD CONTENT
Topic
Content
Source link
Name
8+7 =