随笔分类 - css
摘要:通过 css 控制样式去掉 页眉页脚 <style media="print"> @page { size: auto; /* auto is the initial value */ margin: 0mm; /* this affects the margin in the printer se
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>代码小三角</ti
阅读全文
摘要:至少能弄出来个表格 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title
阅读全文
摘要:记录一下过渡,改变css样式 <style> div { height: 200px; width: 200px; background-color: red; margin: 300px auto; transition: width 2s, background-color 3s; -webki
阅读全文
摘要:暂时没找到更好的办法,先这么用着 一、首先引入 flexible.js 办法一:加载阿里CDN的文件 <script src="http://g.tbcdn.cn/mtb/lib-flexible/0.3.4/??flexible_css.js,flexible.js"></script> 办法二:
阅读全文
摘要:<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0">
阅读全文
摘要:position定位的上下左右居中 <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> </head> <body> <div class="yi"> <div class="er"></div> </div> <
阅读全文
摘要:飞机跑道进度条 <link rel="stylesheet" href="css/font-awesome.css"> <link rel="stylesheet" href="css/style.css"> </head> <body> <div class="container"> <div c
阅读全文
摘要:层级轮播图(animate) css <style type="text/css"> * { margin: 0; padding: 0; } ul, ol { list-style: none; } .wrap { width: 650px; height: 250px; margin: 100p
阅读全文
摘要:轮播图淡入淡出效果 jquery css <style> *{margin: 0;padding: 0;} ul,ol{ list-style: none;} .wrapper{ width: 670px; height: 240px; margin: 100px auto; overflow: h
阅读全文
摘要:单行省略 display: block; overflow: hidden; white-space: nowrap; text-overflow:ellipsis; 多行省略 (数字即为自定义的行数)/(需要注意溢出隐藏的高度) overflow:hidden; text-overflow:ell
阅读全文
摘要:笔记+小案例 <style> .zi{ height:100px; width:100px; background:purple; margin:2px; line-height:100px; text-align: center; color:#fff; } .fu{ height:400px;
阅读全文
摘要:父元素高度自适应,子元素 float 后,造成父元素高度为0,称为高度塌陷问题。 推荐使用万能清除法解决。(给需要清除浮动的元素添加一个class名 clear) 万能清除法代码 父元素:after{ content: ""; height: 0; clear: both; overflow: hi
阅读全文
摘要:一个简单的遮罩 1 <style> 2 #loading{ 3 display:none; 4 width:100%; 5 margin:0 auto; 6 position:fixed; 7 left:0; 8 top:0; 9 bottom: 0; 10 z-index: 111; 11 bac
阅读全文
摘要:css 默认样式重置 1 @charset "utf-8"; 2 *{margin:0;padding:0;} 3 img {border:none; display:block;} 4 em,i{ font-style:normal;} 5 body, div, dl, dt, dd, ul, o
阅读全文