日常笔记
英文词组强制换行
word-wrap:break-word
超宽图居中自适应
.header{height:425px;width:100%;margin-left:50%;}
.top1{height:65px;margin:0 auto;background:url(../img/header.jpg) no-repeat top center;position:relative;right:50%}
背景图在后边带链接
background:url(../img/xtb.png) no-repeat right -244px;display:inline-block;vertical-align:middle;line-height:30px;padding-right:4px
边框透明加圆角
border: 6px solid rgba(165, 165, 165, 0.4);
border-radius: 6px 6px 6px 6px;
按钮本页也开:
onclick="window.open('wxjrfgg2.html','_parent')"
<input type="submit" name="button2" id="button2" value="变更资格预审公告" onclick="window.open('wxjrfgg2.html','_parent')" class="btn19" />
打开新页面自定义大小
window.open ('page.html', 'newwindow', 'height=100, width=400, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=n o, status=no')
下拉菜单带链接
<script type="text/javascript">
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
</script>
<form name="form" id="form">
<select name="jumpMenu" id="jumpMenu" onchange="MM_jumpMenu('parent',this,0)">
<option value="http://baidu.com">项目1</option>
<option value="http://ebnew.com">项目2</option>
</select>
</form>
响应式设计,宽度能根据设备分辨率让浏览器的可视宽度来适应
<meta name="viewport" content="width=device-width, initial-scale=1.0">
绝对值自定义宽度
white-space:nowrap;
文字两端对齐
text-align:Justify;
text-justify:inter-ideograph;
-webkit-text-align-last:justify;
box-shadow:0px 0px 4px #f9aeae; css3阴影