How to use CSS3 to achieve Material Design effects

高洛峰
Release: 2017-03-10 09:53:01
Original
1838 people have browsed it

This article mainly introduces the method of using CSS3 to achieve Material Design effects. It is a beautification of native components based on tag attributes, which has certain reference value. Those who are interested can learn about it.

Preview

使用CSS3实现Material Design效果的方法

This is a css file that is being improved. It beautifies the native component based on the label attribute and improves the datepicker. , select, etc. that cannot be implemented with css are not considered in this article for the time being.

ButtonButton

##Initial button

    <button>button</button>
    <button class="red">red</button>
    <button class="orange">orange</button>
    <button class="blue">blue</button>
    <button class="green">green</button>
    <button class="link">link</button>
Copy after login

Stroke button

    <button class="b-red bk-n">button</button>
    <button class="b-red">red</button>
    <button class="b-orange">orange</button>
    <button class="b-blue">blue</button>
    <button class="b-green">green</button>
Copy after login

Disable button

<button disabled>disabled</button>
Copy after login

##Floating button


##

    <button class="circle">+</button>
    <button class="circle teal">+</button>
Copy after login

Button Group


    <nav class="btn-group">
        <button>button</button>
        <button>button</button>
        <button>button</button>
    </nav>
Copy after login

Form


Text input


<input type="text">
<input type="password" >
Copy after login

Switch


<input type="checkbox" id="switch1" class="switch"><label for="switch1"></label>
Copy after login

Single choice


<input type="radio" id="test_radio1" name="ra"><label for="test_radio1">radio1</label>
<input type="radio" disabled id="test_radio3" name="ra"><label for="test_radio3">radio3</label>
<input type="radio" checked disabled id="test_radio4" name="ras"><label for="test_radio4">radio4</label>
Copy after login

Multiple choice

<input id="test_checkbox1" type="checkbox"><label for="test_checkbox1">check1</label>
<input id="test_checkbox3" disabled type="checkbox"><label for="test_checkbox3">check3</label>
<input id="test_checkbox4" checked disabled type="checkbox"><label for="test_checkbox4">check4</label>
Copy after login

The above is the entire content of this article. I hope it will be helpful to everyone's learning, and I also hope that everyone will support the PHP Chinese website.

The above is the detailed content of How to use CSS3 to achieve Material Design effects. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template