Home  >  Article  >  Backend Development  >  Please tell me how to achieve the effect on the picture? This community

Please tell me how to achieve the effect on the picture? This community

WBOY
WBOYOriginal
2016-12-01 00:56:34948browse

Please tell me how to achieve the effect on the picture? This community

Reply content:

Please tell me how to achieve the effect on the picture? This community

<code class="html"><div class="tips">
    xxxxx
</div></code>
<code class="css">.tips{
    position:fixed;
    display:block;
    bottom:0;
    left:0;
    height:100px;
    width:100%;
    background:#ccc;
    color:#fff;
    z-index:999;
}</code>

Use fixed positioning

HTML:

<code><div class="nologin">
    这个是内容
</div></code>

css

<code>.nologin{
    position:fixed; 
    bottom:0;
    left:0;
    height:100px;
    width:100%;
    background:#eee;
    color:#333;
    z-index:999;
    display:none
}</code>

Then hide and listen for scroll events. When the scroll is larger than the position you want, the prompt will be displayed, otherwise it will be hidden

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn