随笔分类 -  # 前端功能实现

摘要::root { --border-width: .04rem; } table { border: var(--border-width) solid black; border-collapse: collapse; border-radius: .15rem;/*圆角*/ } td, th { 阅读全文
posted @ 2021-06-23 12:38 海胆Sur 阅读(3) 评论(0) 推荐(0) 编辑
摘要:$(".totop").hide() console.log("事件载入") $(window).scroll(function(){ var scrolltop = $(document).scrollTop(); if(scrolltop > 200){ $(".totop").show() } 阅读全文
posted @ 2020-10-02 10:54 海胆Sur 阅读(20) 评论(0) 推荐(0) 编辑
摘要:.img { display: inline-block; width: 18px;/*小图片的尺寸*/ height: 18px;/*小图片的尺寸*/ background:口#333 url(" images/ icons_ type . png") no repeat;/*雪碧图*/ back 阅读全文
posted @ 2020-10-02 10:19 海胆Sur 阅读(4) 评论(0) 推荐(0) 编辑
摘要:原理: 1. 利用js定时器实现循环 or 利用动画实现循环 2. 平移轮播可以通过改变水平方向上的margin值实现; 单图出现的轮播可以定位消失和隐藏/z-index来实现; 阅读全文
posted @ 2020-10-02 10:18 海胆Sur 阅读(11) 评论(0) 推荐(0) 编辑
摘要:*{margin: 0;padding: 0;}/*样式重置*/ ul>*{ float: left; } ul>*::after{ clear: both; } li{ list-style: none;/*去除默认标点*/ } a{ color: black; text-decoration: 阅读全文
posted @ 2020-09-30 16:39 海胆Sur 阅读(5) 评论(0) 推荐(0) 编辑
摘要:.text{ line-height: 40rpx; display: -webkit-box; -webkit-box-orient: vertical; text-overflow: ellipsis; overflow: hidden; -webkit-line-clamp: 1; } 阅读全文
posted @ 2020-09-25 10:03 海胆Sur 阅读(6) 评论(0) 推荐(0) 编辑
摘要:*{margin: 0;padding: 0;}/*样式重置*/ ul{ overflow: hidden; } li{ list-style: none;/*去除默认标点*/ float: left; } a{ color: black; text-decoration: none;/*去除下划线 阅读全文
posted @ 2020-09-18 16:34 海胆Sur 阅读(2) 评论(0) 推荐(0) 编辑
摘要:代码中的div要为footer的父框 html{ height: 100%; /*保证页面高度撑满屏幕*/ } body{ height: 100%; } body>div{ /*保证footer是相对于div位置绝对定位*/ position:relative; width:100%; min-h 阅读全文
posted @ 2020-09-15 20:04 海胆Sur 阅读(12) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示