平常积累,整理

自己的整理,方便自己查阅

查找学习资料罗马盘 https://www.luomapan.com/search
程序员的在线工具https://tool.lu/
IT网站导航: http://www.h-ui.net/site.shtml

1.contenteditable

contenteditable="true"    允许内容被编辑

2.pc通用的媒体查询

@media (min-width: 1024px){
    body{font-size: 18px}
} /*>=1024的设备*/

@media (min-width: 1100px) {
    body{font-size: 20px}
} /*>=1100的设备*/
@media (min-width: 1280px) {
    body{font-size: 22px;}
} /*>=1280的设备*/

@media (min-width: 1366px) {
    body{font-size: 24px;}
}
@media (min-width: 1440px) {
    body{font-size: 25px !important;}
}

@media (min-width: 1680px) {
    body{font-size: 28px;}
}
@media (min-width: 1920px) {
    body{font-size: 33px;}
} 

3.jquery-ajax中的serialize()

serialize()方法是将表单文本序列化,生成 URL 编码文本字符串
name= 'age' value='666'
$('#div2').text($('form').serialize());


4、样式重置

html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
  outline: none;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}
html { height: 101%; }
body { font-size: 62.5%; line-height: 1; font-family: Arial, Tahoma, sans-serif; }
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { display: block; }
ol, ul { list-style: none; }
blockquote, q { quotes: none; }
blockquote:before, blockquote:after, q:before, q:after { content: ''; content: none; }
strong { font-weight: bold; }
table { border-collapse: collapse; border-spacing: 0; }
img { border: 0; max-width: 100%; }
p { font-size: 1.2em; line-height: 1.0em; color: #333; }

5、典型的CSS清除浮动

.clearfix:after { content: "."; display: block; clear: both; visibility: hidden; line-height: 0; height: 0; }
.clearfix { display: inline-block; }
html[xmlns] .clearfix { display: block; }
* html .clearfix { height: 1%; }

6、判断ie浏览器

 if(!!window.ActiveXObject || "ActiveXObject" in window){}else{}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值