<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no" />
content属性值 :
width:可视区域的宽度,值可为数字或关键词device-width
height:同width
intial-scale:页面首次被显示是可视区域的缩放级别,取值1.0则页面按实际尺寸显示,无任何缩放
maximum-scale=1.0, minimum-scale=1.0;可视区域的缩放级别,
maximum-scale用户可将页面放大的程序,1.0将禁止用户放大到实际尺寸之上。
user-scalable:是否可对页面进行缩放,no 禁止缩放
2.
<A href="javascript:void(0)">点击</a>点击链接后不会回到网页顶部 <A href="#">点击</a> 点击后会回到网面顶部 如果没有href 鼠标经过有些浏览器没有 手 的状态 这函数无意义
3.
/*添加收藏 <a title="收藏本站" href="javascript:;" onClick="addFavoritepage('H-ui前端框架','http://www.h-ui.net/');">收藏本站</a> */ /*收藏主站*/ function addFavorite(name,site){ try{window.external.addFavorite(site,name);} catch(e){ try{window.sidebar.addPanel(name,site,"");} catch(e){alert("加入收藏失败,请使用Ctrl+D进行添加");} } } /*收藏页面 <a title="收藏本页" href="javascript:addFavoritepage(0);">收藏本页</a> */ function addFavoritepage(){var sURL=window.location.href;var sTitle=document.title;try{window.external.addFavorite(sURL,sTitle);}catch(e){try{window.sidebar.addPanel(sTitle,sURL,"");}catch(e){alert("加入收藏失败,请使用Ctrl+D进行添加");}}} /*设为首页*/ function setHome(obj){ try{obj.style.behavior="url(#default#homepage)";obj.setHomePage(webSite);} catch(e){if(window.netscape){ try {netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");} catch(e){alert("此操作被浏览器拒绝!\n请在浏览器地址栏输入\"about:config\"并回车\n然后将 [signed.applets.codebase_principal_support]的值设置为'true',双击即可。");} var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch); prefs.setCharPref('browser.startup.homepage',url);}} }
4.
/*1 重定义浏览器默认样式 Name: style_reset Explain: 重定义浏览器默认样式 */ *{word-wrap:break-word} html,body,h1,h2,h3,h4,h5,h6,hr,p,iframe,dl,dt,dd,ul,ol,li,pre,form,button,input,textarea,th,td,fieldset{margin:0;padding:0} ul,ol,dl{list-style-type:none} html,body{*position:static} html{font-family: sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%} address,caption,cite,code,dfn,em,th,var{font-style:normal;font-weight:400} input,button,textarea,select,optgroup,option{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit} input,button{overflow: visible;vertical-align:middle;outline:none} input[type="submit"],input[type="reset"],input[type="button"],input[type="text"],input[type="password"]{-webkit-appearance:none;outline:none} body,th,td,button,input,select,textarea{font-family:"Microsoft Yahei","Hiragino Sans GB","Helvetica Neue",Helvetica,tahoma,arial,"WenQuanYi Micro Hei",Verdana,sans-serif,"\5B8B\4F53";font-size:12px;color: #333;-webkit-font-smoothing: antialiased;-moz-osx-font-smoothing:grayscale} body{line-height:1.6} h1,h2,h3,h4,h5,h6{font-size:100%} a,area{outline:none;blr:expression(this.onFocus=this.blur())} a{text-decoration:none;cursor: pointer} a:hover{text-decoration:underline;outline:none} a.ie6:hover{zoom:1} a:focus{outline:none} a:hover,a:active{outline:none}:focus{outline:none} sub,sup{vertical-align:baseline} button,input[type="button"], input[type="submit"] {line-height:normal !important} /*img*/ img{border:0;vertical-align:middle} a img,img{-ms-interpolation-mode:bicubic} /*IE下a:hover 背景闪烁*/ *html{overflow:-moz-scrollbars-vertical;zoom:expression(function(ele){ele.style.zoom = "1";document.execCommand("BackgroundImageCache",false,true)}(this))} /*HTML5 reset*/ header,footer,section,aside,details,menu,article,section,nav,address,hgroup,figure,figcaption,legend{display:block;margin:0;padding:0}time{display:inline} audio,canvas,video{display:inline-block;*display:inline;*zoom:1} audio:not([controls]){display:none} legend{width:100%;margin-bottom:20px;font-size:21px;line-height:40px;border:0;border-bottom:1px solid #e5e5e5} legend small{font-size:15px;color:#999} svg:not(:root) {overflow: hidden} fieldset {border-width:0;padding: 0.35em 0.625em 0.75em;margin: 0 2px;border: 1px solid #c0c0c0} input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button {height: auto} input[type="search"] {-webkit-appearance: textfield; /* 1 */} input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration {-webkit-appearance: none}