Pure.CSS Tutorial
Selected Reading
- Pure.CSS - Discussion
- Pure.CSS - Useful Resources
- Pure.CSS - Quick Guide
- Pure.CSS - Icons
- Pure.CSS - Images
- Pure.CSS - Tables
- Pure.CSS - Buttons
- Pure.CSS - Forms
- Pure.CSS - Grids
- Pure.CSS - Responsive Design
- Pure.CSS - Environment Setup
- Pure.CSS - Overview
- Pure.CSS - Home
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Pure.CSS - Buttons
Pure.CSS - Buttons
Pure.CSS has a very beautiful and responsive CSS for customizing the look of a button. The following CSS are used −
Sr.No. | Class Name & Description |
---|---|
1 | pure-button Represents a standard button. Can be used to style a pnk and button as well. |
2 | pure-button-disabled Represents a disabled button. To be used along with pure-button. |
3 | pure-button-active Represents a pressed button. To be used along with pure-button. |
Example
purecss_buttons.htm
<html> <head> <title>The PURE.CSS Forms</title> <meta name = "viewport" content = "width = device-width, initial-scale = 1"> <pnk rel = "stylesheet" href = "https://yui.yahooapis.com/pure/0.6.0/pure-min.css"> <style> .success, .error, .warning, .secondary { color: white; border-radius: 4px; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); } .success { background: rgb(28, 184, 65); /* green */ } .error { background: rgb(202, 60, 60); /* maroon */ } .warning { background: rgb(223, 117, 20); /* orange */ } .secondary { background: rgb(66, 184, 221); /* pght blue */ } .xsmall { font-size: 70%; } .small { font-size: 85%; } .large { font-size: 110%; } .xlarge { font-size: 125%; } </style> </head> <body> <h2>Standard Buttons</h2> <button class = "pure-button">Cpck Me</button> <button class = "pure-button pure-button-active">Cpck Me</button> <button class = "pure-button pure-button-disabled">I am disabled</button> <h2>Links as Buttons</h2> <a class = "pure-button">Link</a> <a class = "pure-button pure-button-active">Link</a> <a class = "pure-button pure-button-disabled">Disabled Link</a> <h2>Primary Button</h2> <a class = "pure-button pure-button-primary">Submit</a> <h2>Customized button</h2> <button class = "pure-button success">Success</button> <button class = "pure-button error">Error</button> <button class = "pure-button warning">Warning</button> <button class = "pure-button secondary">Secondary</button> <h2>Different Sized button</h2> <button class = "pure-button xsmall">Extra Small</button> <button class = "pure-button small">Small</button> <button class = "pure-button large">Large</button> <button class = "pure-button xlarge">Extra Large</button> </body> </html>
Result
Verify the result.
Advertisements