8.26. Foundation slider

发布时间 : 2025-10-25 13:33:56 UTC      

Page Views: 9 views

The Foundation slider allows you to drag to select an interval value:

The slider can be used by using the

class="range-slider" data-slider> Create. In
Inside, add two Elements: class="range-slider-handle"> Create a rectangular slider (blue background) class="range-slider-active-segment"> It is the gray bar behind the slider, which is the area where the slider is dragged.

注意: The slider needs to use JavaScript. So you need to initialize Foundation JS:

8.26.1. Example

尝试一下 »

Fillet and disable slider

Use .radius And .round Class to add fillet sliders. Use .disabled Class to disable the slider:

8.26.2. Example

<div class="range-slider" data-slider>..div> <div class="range-slider radius" data-slider>...div> <div class="range-slider round" data-slider>...div> <div class="range-slider disabled" data-slider>...div>    

尝试一下 »

Vertical slider

Use .vertical-range Class and data-options="vertical: true;" To create a vertical slider:

8.26.3. Example

<div class="range-slider vertical-range" data-slider data-options="vertical: true;"> <span class="range-slider-handle">span> <span class="range-slider-active-segment">span> div>    

尝试一下 »

Slider value

By default, the slider is placed in the middle of the bar (the value is “50”). Can be done by adding data-options="initial: num" Property to modify the default value:

8.26.4. Example

<div class="range-slider" data-slider data-options="initial: 80;"> <span class="range-slider-handle">span> <span class="range-slider-active-segment">span> div>    

尝试一下 »

Show slider valu

If we need to display values in real time as the slider is dragged, we can use the

Add in data-options="display_selector:#id" Attribute and the element id value matches the id of the slider, as shown in the following example:

8.26.5. Example

  

尝试一下 »

Combined data option

The following example uses the display_selector And initial Data options:

8.26.6. Example

<span id="mySlider">span> <div class="range-slider" data-slider data-options="display_selector: #mySlider; initial: 20;"> <span class="range-slider-handle">span> <span class="range-slider-active-segment">span> div>    

尝试一下 »

步长

默认情况下,滑块滑动的增加减少的数量为 “1”。可以通过添加 data-options="step: num;" 属性来修改步长值。实例中设置为 25:

8.26.7. Example

<span id="mySlider">span> <div class="range-slider" data-slider data-options="display_selector: #mySlider; step: 25;"> <span class="range-slider-handle">span> <span class="range-slider-active-segment">span> div>    

尝试一下 »

Custom interval

By default, the range values are “0” to “100”. You can add data-options start And end To set the interval value. The following example sets the range value from “1” to “20”:

8.26.8. Example

<span id="mySlider">span> <div class="range-slider" data-slider data-options="display_selector: #mySlider; start: 1; end: 20;"> <span class="range-slider-handle">span> <span class="range-slider-active-segment">span> div>    

尝试一下 »

Working with Grid

The following is used to use the slider in the mesh:

8.26.9. Example

尝试一下 »

Use Input

The following examples use the Replace To display the value of the slider:

8.26.10. Example

尝试一下 »

《地理信息系统原理、技术与方法》  97

最近几年来,地理信息系统无论是在理论上还是应用上都处在一个飞速发展的阶段。 GIS被应用于多个领域的建模和决策支持,如城市管理、区划、环境整治等等,地理信息成为信息时代重要的组成部分之一; “数字地球”概念的提出,更进一步推动了作为其技术支撑的GIS的发展。 与此同时,一些学者致力于相关的理论研究,如空间感知、空间数据误差、空间关系的形式化等等。 这恰好说明了地理信息系统作为应用技术和学科的两个方面,并且这两个方面构成了相互促进的发展过程。