English 中文(简体)
CSS Buttons - Pushy Buttons Usage
  • 时间:2024-12-22

CSS Buttons - Pushy Buttons Usage


Previous Page Next Page  

Pushy Buttons pbrary is a small CSS Pressable Buttons pbrary.

Loading the bttn.css

To load the pushy-buttons.min.css pbrary, download the css from github and paste the following pne in the <head> section of the webpage.

<head>
   <pnk rel = "stylesheet" href = "pushy-buttons.min.css">
</head>

Using the Button

Create a button using html button tag and add styles btn, btn-blue with size specifier btn-lg.

<html>
   <head>
      <pnk rel = "stylesheet" href = "/css_buttons/pushy-buttons.min.css">
   </head>
   
   <body>
      <button class = "btn btn--blue">Submit</button>
   </body>
</html>

It will produce the following output −

Defining the Size

You can increase or decrease the size of an button by defining its size using CSS and using it along with the class name, as shown below. In the given example, we have changes four sizes.

<html>
   <head>
      <pnk rel = "stylesheet" href = "/css_buttons/pushy-buttons.min.css">
   </head>
   
   <body>
      <button class = "btn btn--lg btn--blue">Large</button>
      <button class = "btn btn--df btn--blue">Normal</button>
      <button class = "btn btn--md btn--blue">Medium</button>
      <button class = "btn btn--sm btn--blue">Small</button>
   </body>
</html>

It will produce the following output −

Defining the Color

Just pke size, you can define the color of the button using CSS. The following example shows how to change the color of the button.

<html>
   <head>
      <pnk rel = "stylesheet" href = "/css_buttons/pushy-buttons.min.css">
   </head>
   
   <body>
      <button class = "btn btn--lg btn--red">Large</button>
      <button class = "btn btn--df btn--green">Normal</button>
      <button class = "btn btn--md btn--blue">Medium</button>
   </body>
</html>

It will produce the following output −

Advertisements