摘要: 通过className获取元素,不同的浏览器会有不同的支持情况,所以为了兼容各个浏览器在这里,我写了几个函数获取className的值 function byclass(classn){//全局获取类 var tags=document.all ? document.all : document.g 阅读全文
posted @ 2017-06-12 18:09 凉心丶浮沉 阅读(820) 评论(0) 推荐(0) 编辑
摘要: jQuery 选择器选择器 实例 选取* $("*") 所有元素#id $("#lastname") id="lastname" 的元素.class $(".intro") 所有 class="intro" 的元素element $("p") 所有 <p> 元素.class.class $(".in 阅读全文
posted @ 2017-06-12 17:59 凉心丶浮沉 阅读(203) 评论(0) 推荐(0) 编辑
摘要: 做法一:仅使用vw作为CSS单位 在仅使用 vw 单位作为唯一应用的一种 CSS 单位的这种做法下,我们遵守: 1.对于设计稿的尺寸转换为vw单位,我们使用sass函数编译 做法二:搭配vw和rem,布局更优化2.无论是文本还是布局高宽、间距等都使用 vw 作为 CSS 单位 3.1物理像素线(也就 阅读全文
posted @ 2017-06-12 17:57 凉心丶浮沉 阅读(197) 评论(0) 推荐(0) 编辑
摘要: ``` <!doctype html><html lang="en"><head> <meta charset="UTF-8"> <title>Document</title> <style> *{ margin: 0px; padding: 0px; } .box1{ width: 300px; 阅读全文
posted @ 2017-06-12 17:50 凉心丶浮沉 阅读(175) 评论(0) 推荐(0) 编辑