摘要: html5移动页面自适应屏幕宽度 1.使用meta标签,在头部加入下面代码 <meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user- 阅读全文
posted @ 2016-06-22 21:50 唯一的liaoliao 阅读(498) 评论(0) 推荐(0) 编辑
摘要: 这两天学的是自适应,代码有点乱。而且这几天忙着写实习报告,也没有时间去整理。 但是,这下面代码吧,是可以获取html的font-size值的,然后用来设置相对单位rem的从而达到自适应效果的;看到红色的width了吧,把它改成你屏幕宽度就好,比如我的是1920px;那么这样算出来html{font- 阅读全文
posted @ 2016-06-21 22:43 唯一的liaoliao 阅读(5687) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>单页-01</title> <script src="js/jquery.js"></script> <style> *{margin:0;padding: 0} 阅读全文
posted @ 2016-06-17 20:40 唯一的liaoliao 阅读(438) 评论(0) 推荐(0) 编辑
摘要: index.html <!DOCTYPE><html lang="zh-cn"><head> <meta charset="utf-8"> <title>01-单页</title> <link rel="stylesheet" href="CSS/index.css"> <script src="j 阅读全文
posted @ 2016-06-16 21:56 唯一的liaoliao 阅读(219) 评论(0) 推荐(0) 编辑
摘要: index.html部分 <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>图册</title> <link rel="stylesheet" href="css/index.css"> <script src=" 阅读全文
posted @ 2016-06-15 22:05 唯一的liaoliao 阅读(285) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>选项卡</title> <style> *{margin: 0;padding: 0;} ul li{ padding: 3%; list-style: none; 阅读全文
posted @ 2016-06-14 21:28 唯一的liaoliao 阅读(1172) 评论(0) 推荐(0) 编辑
摘要: 在网页代码的头部,加入一行viewport元标签。 <meta name="viewport" content="width=device-width,initial-scale=1" /> viewport是网页默认的宽度和高度,上面这行代码的意思是,网页宽度默认等于屏幕宽度(width=devi 阅读全文
posted @ 2016-06-13 20:03 唯一的liaoliao 阅读(193) 评论(0) 推荐(0) 编辑
摘要: 鼠标经过选项卡 $(".TAB li").mousemove(function(){ var $vv=$(this).parent(".TAB").attr("id"); $($vv).hide(); $(this).parent(".TAB").find("li").removeClass("ho 阅读全文
posted @ 2016-06-13 19:55 唯一的liaoliao 阅读(132) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="" content=""> <title>风车特效</title> <style> *{margin: 0;padding: 0;} .picture{ 阅读全文
posted @ 2016-06-13 19:52 唯一的liaoliao 阅读(613) 评论(0) 推荐(0) 编辑
摘要: 网页可见区域宽:document.body.clientWidth; 网页可见区域高:document.body.clientHeight; 网页可见区域宽:document.body.offsetWidth;(包括边线的宽) 网页可见区域高:document.body.offsetHeight;( 阅读全文
posted @ 2016-06-12 20:22 唯一的liaoliao 阅读(283) 评论(0) 推荐(0) 编辑