|
|
本帖最后由 全球VPS大学 于 2019-12-17 22:22 编辑
对大侠来说很简单,我小白还在学习。
CSS和html
然后我运行代码后,点击X,关不掉,这是什么问题。大侠帮忙找一下问题。
- html{height: 100%;}
- body{margin: 0; background:#fff; font-family:Helvetica,Arial,PingFangSC-Regular,Microsoft Yahei,sans-serif; font-size:0.35rem; line-height: 140%; color: #666;-webkit-text-size-adjust: none;-webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: grayscale;}
- ul,li{margin:0; padding:0; list-style:none;}
- .fodong_box{display: block; padding: 0 0.5rem; background: rgba(0,0,0,0.3); color: #fff; position: absolute; top: 0; z-index: 9999; width: 100%;}
- .fodong_tips{float: left; overflow: hidden; margin: 0 auto; width: 100%; height: 1.2rem; line-height: 1.2rem;}
- .mytip {background: #ff1500;padding: 0.05rem 0.1rem;margin-right: 0.1rem;border-radius: 2px;}
- .close_tips{float: right; color: #fff; font-size: 0.325rem; line-height: 0.9rem;margin-right: 10px;}
复制代码
这是CSS 的
- <div id="fd_tips" class="fodong_box">
- <div id="mq" class="fodong_tips">
- <a class="close_tips" onclick="mq" href="javascript:void(0)">X</a>
- <ul style="margin-top: 0px;">
- <li>小小的公告一枚。</li>
- </ul>
- </div>
- </div>
复制代码 |
|