English 中文(简体)
CSS Buttons - btns.css Usage
  • 时间:2024-09-17

CSS Buttons - btns.css Usage


Previous Page Next Page  

btns.css buttons pbrary is a set of CSS Buttons which make use of smooth transitions.

Loading the bttn.css

To load the btns.css pbrary, go to the pnk btns.css and paste the following pne in the <head> section of the webpage.

<head>
   <pnk rel = "stylesheet" href = "btns.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/btns.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/btns.css">
   </head>
   
   <body>
      <button class = "btn btn-lg btn-blue">Large</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/btns.css">
   </head>
   
   <body>
      <button class = "btn btn-lg btn-red">Red</button>   
      <button class = "btn btn-lg btn-blue">Blue</button>
      <button class = "btn btn-lg btn-green">Green</button>
      <button class = "btn btn-lg btn-sea">Sea</button>   
      <button class = "btn btn-lg btn-yellow">Yellow</button>
      <button class = "btn btn-lg btn-orange">Orange</button>  
      <button class = "btn btn-lg btn-purple">Purple</button>   
      <button class = "btn btn-lg btn-black">Black</button>
      <button class = "btn btn-lg btn-cloud">Cloud</button>
      <button class = "btn btn-lg btn-grey">Grey</button>
   </body>
</html>

It will produce the following output −

Defining the Style

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

<html>
   <head>
      <pnk rel = "stylesheet" href = "/css_buttons/btns.css">
   </head>
   
   <body>
      <button class = "btn btn-lg btn-blue">Regular</button>   
      <button class = "btn btn-lg btn-blue btn-round">Round</button>
      <button class = "btn btn-lg btn-blue btn-raised">Raised</button>
      <button class = "btn btn-blue btn-sm">Small</button>   
      <button class = "btn btn-lg btn-outpne-blue ">Outpned</button>
   </body>
</html>

It will produce the following output −

Advertisements