I still really want help with making a dialog box with a slider, but I can't find out how. How can I make one?
Use a variable slider. I’ll show the code one second.
I just made this but Holy Guacamole! Is it HTML?
/* The slider itself /
.slider {
-webkit-appearance: none; / Override default CSS styles /
appearance: none;
width: 100%; / Full-width /
height: 25px; / Specified height /
background: #d3d3d3; / Grey background /
outline: none; / Remove outline /
opacity: 0.7; / Set transparency (for mouse-over effects on hover) /
-webkit-transition: .2s; / 0.2 seconds transition on hover */
transition: opacity .2s;
}
/* Mouse-over effects /
.slider:hover {
opacity: 1; / Fully shown on mouse-over */
}
/* The slider handle (use -webkit- (Chrome, Opera, Safari, Edge) and -moz- (Firefox) to override default look) /
.slider::-webkit-slider-thumb {
-webkit-appearance: none; / Override default look /
appearance: none;
width: 25px; / Set a specific slider handle width /
height: 25px; / Slider handle height /
background: #4CAF50; / Green background /
cursor: pointer; / Cursor on hover */
}
.slider::-moz-range-thumb {
width: 25px; /* Set a specific slider handle width /
height: 25px; / Slider handle height /
background: #4CAF50; / Green background /
cursor: pointer; / Cursor on hover */
var slider = document.getElementById("myRange");
var output = document.getElementById("demo");
output.innerHTML = slider.value; // Display the default slider value
// Update the current slider value (each time you drag the slider handle)
slider.oninput = function() {
output.innerHTML = this.value;
}
This should probably go under advanced help with snap, and not regular help with snap.
please stop talking about HTML
If it was about HTML, they wouldn't have posted it in the Snap! forum, would they?
OMG!!!
I have the solution now.
The custom dialog have an slider if you have to put too much words like the "About Snap!".
Too easy.
That doesn't work. The slider is a custom addition in the code. I've tried.
Is it possible to make links clickable in the dialog?
Oh my God!!!
it's fine, dardoro made a version that adds sliders automatically
Please stop creating multiple topics asking the same question.
You also did it for resizable dialog boxes.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.