CSS: Modify the input [type = range] slider style, inputrange

Source: Internet
Author: User

CSS: Modify the input [type = range] slider style, inputrange

Input [type = "range"] is a new attribute of the input tag in html5, as shown below:

<Input type = "range" value = "40"/>

How can I make this slider effect as shown in?

The following is the style section:

 

<Style type = "text/css">
Input [type = "range"] {
-Webkit-box-shadow: 0 1px 0 0px #424242, 0 1px 0 #060607 inset, 0px 2px 10px 0px black inset, 1px 0px 2px rgba (0, 0, 0, 0.4) inset, 0 0px 1px rgba (0, 0, 0, 0.6) inset;
Margin-top: 2px;
Background-color: #272728;
Border-radius: 15px;
Width: 400px;
-Webkit-appearance: none;
Height: 10px;
}
Input [type = "range"]:-webkit-slider-thumb {
-Webkit-appearance: none;
Cursor: default;
Top:-5px;
Height: 30px;
Width: 20px;
Transform: translateY (-4px );
Background: none repeat scroll 0 0 0 #777;
Border-radius: 15px;
-Webkit-box-shadow: 0-1px 1px black inset;
}
</Style>

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.