Materialize css input range [duplicate]

2019-09-21 21:24发布

I was wondering how to have the value of the range to show up when scrolling the range input

<form action="#">
                                                  <h5>The Temperature</h5>
                                                  <!--the temperature-->
                                                    <p class="range-field">
                                                      <input type="range" id="temp" min="0" max="100" />

                                                    </p>

1条回答
你好瞎i
2楼-- · 2019-09-21 21:56

When working with position: relative; the way the object in question is positioned is indeed relative to page margins of your document or relevant container. So for example, of you had a header that you wanted to be positioned in the upper left hand corner of the screen, then the code may look something like this.

h1 {
position: relative;
top: 5px;
right: 5px;
}

Now compare that to position: absolute; where elements are positioned in relation to the browser window or parent element. So while relative positioning does not affect any other elements other than what is specifically targeted, absolute positioning can result in overlapping elements because objects are being placed in specific locations. If you wanted to position an image in the lower right corner of the screen, for instance, your code may look something like this.

img {
position: absolute;
bottom: 0px;
right: 0px;
}
查看更多
登录 后发表回答