Materialize css input range [duplicate]

自闭症网瘾萝莉.ら 提交于 2019-12-13 09:47:14

问题


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:


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;
}


来源:https://stackoverflow.com/questions/34195967/materialize-css-input-range

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!