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