Prepare to put all the slider effects you made under this blog post.
My first result
css
body{ background: black; } #slider_1{ width: 400px; height: 2px; border-radius: 1px; display: -webkit-flex; position: relative; margin: 30px auto; } #oSlider{ width: 15px; height: 15px; position: absolute; border: 1px solid rgb(249,247,107); border-radius: 10px; background: rgb(249,247,107); top: -7px; } #slider_11{ -webkit-flex:1; background: rgb(249,247,107); border-radius: 1px 0 0 1px; } #slider_12{ -webkit-flex:1; background: rgba(255,255,255,0.3); border-radius: 0 1px 1px 0px; }
#num{
font-size: 24px;
color: white;
display: block;
text-align: center;
>
var slider_1=document.getElementById("slider_1");
var oSlider=document.getElementById("oSlider");var num=document.getElementById ("num");
<div id="slider_1"> <div id="slider_11"></div> <span id="oSlider"></span> <div id="slider_12"></div> </div>var width=400; var min=-7;
var max=393;
var drag=false;var slider_11=document.getElementById(" slider_11");
var slider_12=document.getElementById("slider_12");
slider_1.onclick=function(){
var ewidth=event.clientX-slider_1.offsetLeft;
change(ewidth );
}
oSlider.onmousedown=function(){
drag=true;
}
document.onmousemove=function(){
if(drag){
var ewidth=event.clientX-slider_1.offsetLeft;
if(ewidth=max) return ;
change(ewidth);
}
}
document.onmouseup=function(){
drag=false;
}
function change(ewidth){
num.innerText=Math.round((ewidth 6)/width*100);
slider_11.style["-webkit-flex"]=ewidth/width;
slider_12.style["-webkit-flex"]=(width-ewidth)/width;
oSlider.style.left =ewidth "px";
}

A consistent HTML encoding style is important because it improves the readability, maintainability and efficiency of the code. 1) Use lowercase tags and attributes, 2) Keep consistent indentation, 3) Select and stick to single or double quotes, 4) Avoid mixing different styles in projects, 5) Use automation tools such as Prettier or ESLint to ensure consistency in styles.

Solution to implement multi-project carousel in Bootstrap4 Implementing multi-project carousel in Bootstrap4 is not an easy task. Although Bootstrap...

How to achieve the effect of mouse scrolling event penetration? When we browse the web, we often encounter some special interaction designs. For example, on deepseek official website, �...

The default playback control style of HTML video cannot be modified directly through CSS. 1. Create custom controls using JavaScript. 2. Beautify these controls through CSS. 3. Consider compatibility, user experience and performance, using libraries such as Video.js or Plyr can simplify the process.

Potential problems with using native select on mobile phones When developing mobile applications, we often encounter the need for selecting boxes. Normally, developers...

What are the disadvantages of using native select on your phone? When developing applications on mobile devices, it is very important to choose the right UI components. Many developers...

Use Three.js and Octree to optimize collision handling of third-person roaming in the room. Use Octree in Three.js to implement third-person roaming in the room and add collisions...

Issues with native select on mobile phones When developing applications on mobile devices, we often encounter scenarios where users need to make choices. Although native sel...


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Dreamweaver CS6
Visual web development tools

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.
