/* ============================================
	公用、重置样式 - pub.css
	更新：2014-04-07
	By:DogNicole QQ:7877767
============================================ */


/*
	.font-size-zoom-false

	通常在body的样式上启用了字号自动调整：
	body{-webkit-text-size-adjust: 100%;-ms-text-size-adjust: 100%;}

	1.以上代码作用是当字号在 12px 以下时，支持以上私有属性的浏览器会自动放大字号为 12px
	2.宋体小于 12px 时自动放大是合理的，但有可能实际情况是中文雅黑混排英文字体，而英文因设计上的需要，要小于 12px
	3.在版权等需要用小字号的局部范围调用 font-size-zoom-false 这个 class 禁止文字大小在该区域被自动放大
	4.body 上用此属性会导致页面缩放失效(用在 html 上 body 也会继承本属性)避免用在全局样式上，避免本属性被子级继承

	经测试，此方法在较新的安卓设备上已基本上无效，中文字号无法用此方法设置到小于12px
*/
.font-size-zoom-false{
	-webkit-text-size-adjust: none;
	-ms-text-size-adjust: none;
}








/*
	.debug

	用于快速检查布局排除常见错误，在支持 outline 的浏览器下：

	1.给html元素 class 追加 .debug 后检查盒边界范围
	2.将 .debug{...} 直接改名为 *{...} 后检查页面中所有元素盒边界范围
*/
.debug{outline:red dotted 1px;}


/*
	#csshack
	此ID并无具体作用，只是示意常用 css 区别各常见浏览器的方法
*/
#csshack{
	padding: 10px;		/* FF、OP、CH、WK、IE9+ */
	padding: 9px \9;	/* all ie */
	padding: 8px \0;	/* ie8-9 */
	*padding: 5px;		/* ie6-7 */
	+padding: 7px;		/* ie7 */
	_padding: 6px;		/* ie6 */
}


/*
	html{filter:expression(document.execCommand("BackgroundImageCache", false, true));}

	解决 IE6 重复请求服务器背景图片 ，如：a:hover 切换背景图时不读取缓存图片而是重新请求服务器的问题
	如果不喜欢用 IE filter 滤镜解决此问题，请删除本段样式，可用 JS 执行以下匿名函数解决
	(function()
	{
		try
		{
			var userAgent = navigator.userAgent.toLowerCase();
			var env = null;
			var ver = 0;
			env = userAgent.match(/msie ([\d.]+)/);
			ver = env ? parseInt(env[1], 10) : 0;if(ver == 6)
			{
				try
				{
					document.execCommand("BackgroundImageCache", false, true);
				}
				catch(e){}
			}
		}
		catch(e){}
	}
	)();
*/
html{filter:expression(document.execCommand("BackgroundImageCache", false, true));}


img, object, embed {max-width: 100%;}	/* 图片、插件等元素设置最大宽度 */
_img, _object, _embed{width: 100%;}		/* IE6 不支持最大宽度，因此默认为 100% 宽度 */

+img {-ms-interpolation-mode: bicubic;}	/* 改善 IE7 图像缩放质量,IE7私有属性 */
img {vertical-align: middle;}			/* 修正 IE 图片下方 3pxbug */


html, body, div, span, object, iframe,
a, h1, h2, h3, h4, h5, h6,
p, blockquote, pre, abbr, address, cite,
code, del, dfn, em, img, ins, kbd, q,
samp, small, strong, sub, sup, var, b, i,
dl, dt, dd, ol, ul, li, fieldset, form,
label, legend, table, caption, figcaption,
tbody, tfoot, thead, tr, th, td, article,
aside, figure, footer, header, hgroup,
menu, nav, section, time, mark, audio,
video, details, summary,dialog {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	vertical-align: baseline;
}

article, aside, details, figcaption, figure, footer, header, hgroup, nav, section ,menu ,dialog {display: block;}

figure {margin: 0;}

audio[controls], canvas, video {
	display: inline-block;
	*display: inline;
	*zoom: 1;
}

audio:not([controls]) {display: none;}

ul, ol, li {
	/*list-style: none;*/
	list-style:none outside none;
	/*
	血的教训，只写：none的话在ie6下
	<ul><li>Links</li></ul>
	浮动这个 ul，并将 ul 设为 inline 后，li的左边会多空白
	原因：IE6,7 中当 UL 具有 float 和 display:inline 属性
	后,设置了 list-style:none 则 list-style-position 也默
	认为 inside 了，即列表符被隐藏,但是仍然在列表的左边占
	有空白位置(list-style-position:inside);
	*/
}

b, strong {font-weight: 700;}

blockquote, q {quotes: none;}

blockquote::before,
blockquote::after,
q::before,
q::after {
	content: "";
	content: none;
}

del {text-decoration: line-through;}

mark {
	background: #ff0;
	color: #000;
}

abbr[title], dfn[title] {
	border-bottom: 1px dotted #000;
	cursor: help;
}

dfn {font-style: italic;}

hr {
	display: block;
	height: 1px;
	margin: 1em 0;
	padding: 0;
	border: 0;
	border-top: 1px solid #ccc;
}

pre, code, kbd, samp {
	/* 对可能出现代码引用的文本块使用宽度字体 */
	font-family: monospace, sans-serif;
	_font-family: "courier new", monospace;
}

pre {
	/* 改善所有浏览器中预格式化文本可读性 */
	white-space: pre;			/* CSS2 */
	white-space: pre-wrap;		/* CSS 2.1 */
	white-space: pre-line;		/* CSS 3 (and 2.1 as well, actually) */
	word-wrap: break-word;		/* IE */
}

pre, code, kbd, samp {
	font-family: monospace, monospace;
	_font-family: "courier new", monospace;
	font-size: 1em;
}



table button, table input {*overflow: auto;}	/* 在 table 中重新加入内边距，以避免 IE6/7 中的交迭和空白问题(原理不明，待查) */

table {
	border-collapse: collapse;
	border-spacing: 0;
}

th {
	font-weight: bold;
	vertical-align: bottom;
}

td {vertical-align: top;}
td, td img {vertical-align: top;}



button, input, select, textarea {
	margin: 0;	/* 归零 Webkit 内核多加的 2px */
	font-size: 100%;
	vertical-align: baseline;
	*vertical-align: middle;
}

button, input {
	line-height: normal;		/* 按钮、文本框行高定义为正常，以匹配 FF3、4 */
	*overflow: visible;			/* 纠正 IE6/7 中显示异常的内边距 */
}

button, input[type="button"], input[type="reset"], input[type="submit"] {
	cursor: pointer;			/* 手形光标，表示可点击的表单元素 */
	-webkit-appearance: button;	/* 允许 iOS 中可点击的表单元素样式 */
}

button {
	width: auto; overflow: visible;	/* make buttons play nice in IE */
}

button:-moz-focus-inner, input:-moz-focus-inner {
	/* 删除 FF3/4 中的内边距和边框 */
	border: 0;
	padding: 0;
}

input[type="checkbox"], input[type="radio"] {box-sizing: border-box;}
input[type="radio"] {vertical-align: text-bottom;}
input[type="checkbox"] {vertical-align: bottom;}
input[type="search"] {
	-webkit-appearance: textfield;
	-moz-box-sizing: content-box;
	-webkit-box-sizing: content-box;
	box-sizing: content-box;
}

input[type="search"]::-webkit-search-decoration {-webkit-appearance: none;}



/* 表单验证提示 */
input:valid, textarea:valid {}	/* 输入合法有效时的设置 */
input:invalid, textarea:invalid {background-color: #f0dddd;}/* 输入错误时的提示警告 */
textarea:focus, input:focus {background: #FEFFF1;}

textarea {
	overflow: auto;			/* 删除 textarea 在 IE6/7/8/9 中的默认垂直滚动条 */
	vertical-align: top;
	resize: vertical;		/* 在支持 html5 文本框尺寸调整的浏览器上仅允许垂直方向调整 textarea 大小 */
}


/* html5表单文本默认值 */
::-webkit-input-placeholder {color:#a9a9a9;}
input:-moz-placeholder {color:#a9a9a9;}
textarea:-moz-placeholder {color:#a9a9a9;}


legend {
	/* 纠正 legend 在 IE6/7 中显示异常的对齐 */
	border: 0;
	*margin-left: -7px;
	padding: 0;
}

/* 手型鼠标元素 */
label,
input[type="button"],
input[type="submit"],
input[type="file"],
button{
	cursor: pointer;
}



/* ==|== 浮动及清理 ==============================================
 * 浮动，并消除ie6双倍浮动边
 * 预置清理浮动方法
================================================================== */
.fl {float: left;_display: inline;}
.fr {float: right;_display: inline;}
.o-clear {overflow: hidden;zoom: 1;}

.p-clear {
	clear: both;
	height: 0;
	line-height: 0;
	font-size: 0;
}

.fix:before, .fix::after {
	content: "\0020";
	display: block;
	height: 0;
	line-height: 0;
	overflow: hidden;
	visibility: hidden;
}

.fix::after {clear: both;}
.fix {zoom: 1;}



/* ==|== 隐藏元素 ==============================================
 * 针对不同设备隐藏元素方式
================================================================ */
/* 同时在屏幕读取器和浏览器中隐藏 */
.hide {display: none;}

/* 仅可视隐藏，在屏幕读取器中可用 */
.hide-pro {
	border: 0;
	clip: rect(0 0 0 0);
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	position: absolute;
}

/* 允许元素通过键盘浏览时成为焦点 */
.hide-tab.focusable:active,
.vhide-tab.focusable:focus {
	clip: auto;
	width: auto;
	height: auto;
	margin: 0;
	overflow: visible;
	position: static;
}

/* 可视隐藏且在屏幕读取器中隐藏，但保留布局 */
.hide-v {visibility: hidden;}





/* ==|== IE9 溢出 ================================================
 * 纠正 IE9 中一个怪异的溢出现象
================================================================== */
svg::not(:root) {overflow: hidden;}





/* ==|== h 标签预定义 ================================================
 * h1 ~ h6 字号默认大小
====================================================================== */
h1 ,h2 ,h3 ,h4 ,h5 ,h6 {font-size: 1.2em;}


/* 上标、下标 */
sub, sup {
	font-size: 75%;
	line-height: 0;
	vertical-align: baseline;
	position: relative;
}

sup {top: -0.5em;}
sub {bottom: -0.25em;}



/* 文本被选状态背景色及字体颜色 for Mozilla */
::-moz-selection {
	background: #144B9E;
	color: #fff;
}

/* 文本被选状态背景色及字体颜色 for Webkit,Opera9.5+,Ie9+ */
::selection{
	background: #144B9E;
	color: #fff;
}



/*文本两端对齐*/
.just-align {
	text-align: justify;
	text-justify: inter-ideograph;
}





/* .auto-ico 为不同链接类型添加小图标 */
.auto-ico a[href*="youtube.com/watch?"]::after, .auto-ico a[href *="sevenload.com/videos/"]::after, .auto-ico a[href *="metacafe.com/watch/"]::after {
	content: url(../img/addico/film.gif);
}

.auto-ico a[href*="flickr.com/photos/"]::after, .auto-ico a[href *="zooomr.com"]::after, .auto-ico a[href *="imageshack.us"]::after, .auto-ico a[href *="bubbleshare.com"]::after, a[href *="sevenload.com/bilder/"]::after {
	content: url(../img/addico/pic.gif);
}

/* extensions */

.auto-ico a[href$=".doc"]::after, .auto-ico a[href$=".rtf"]::after {
	content: url(../img/addico/doc.gif);
}

.auto-ico a[href$=".txt"]::after {
	content: url(../img/addico/txt.gif);
}

.auto-ico a[href$=".xls"]::after {
	content: url(../img/addico/xls.gif);
}

.auto-ico a[href$=".rss"]::after, .auto-ico a[href$=".atom"]::after {
	content: url(../img/addico/feed.gif);
}

.auto-ico a[href$=".opml"]::after {
	content: url(../img/addico/opml.gif);
}

.auto-ico a[href$=".phps"]::after {
	content: url(../img/addico/phps.gif);
}

.auto-ico a[href$=".phps"]::after {
	content: url(../img/addico/phps.gif);
}

.auto-ico a[href$=".torrent"]::after {
	content: url(../img/addico/torrent.gif);
}

.auto-ico a[href$=".vcard"]::after {
	content: url(../img/addico/vcard.gif);
}

.auto-ico a[href$=".exe"]::after {
	content: url(../img/addico/exe.gif);
}

.auto-ico a[href$=".dmg"]::after, .auto-ico a[href$=".app"]::after {
	content: url(../img/addico/dmg.gif);
}

.auto-ico a[href$=".pps"]::after {
	content: url(../img/addico/pps.gif);
}

.auto-ico a[href$=".pdf"]::after {
	content: url(../img/addico/pdf.gif);
}

.auto-ico a[href$=".xpi"]::after {
	content: url(../img/addico/plugin.gif);
}

.auto-ico a[href$=".fla"]::after, .auto-ico a[href$=".swf"]::after {
	content: url(../img/addico/flash.gif);
}

.auto-ico a[href$=".zip"]::after, .auto-ico a[href$=".rar"]::after, .auto-ico a[href$=".gzip"]::after, .auto-ico a[href$=".bzip"]::after, .auto-ico a[href$=".ace"]::after {
	content: url(../img/addico/archive.gif);
}

.auto-ico a[href$=".ical"] {
	content: url(../img/addico/ical.gif);
}

.auto-ico a[href$=".css"]::after {
	content: url(../img/addico/css.gif);
}

.auto-ico a[href$=".ttf"]::after {
	content: url(../img/addico/ttf.gif);
}

.auto-ico a[href$=".jpg"]::after, .auto-ico a[href$=".gif"]::after, .auto-ico a[href$=".png"]::after, .auto-ico a[href$=".bmp"]::after, .auto-ico a[href$=".jpeg"]::after, .auto-ico a[href$=".svg"]::after, .auto-ico a[href$=".eps"]::after {
	content: url(../img/addico/pic.gif);
}

.auto-ico a[href$=".mov"]::after, .auto-ico a[href$=".wmv"]::after, .auto-ico a[href$=".mp4"]::after, .auto-ico a[href$=".avi"]::after .auto-ico a[href$=".mpg"]::after {
	content: url(../img/addico/film.gif);
}

.auto-ico a[href$=".mp3"]::after, .auto-ico a[href$=".wav"]::after, .auto-ico a[href$=".ogg"]::after, .auto-ico a[href$=".wma"]::after, .auto-ico a[href$=".m4a"]::after {
	content: url(../img/addico/music.gif);
}

/* messenger */
.auto-ico a[href^="aim:"]::after {
	content: url(../img/addico/aim.gif);
}

.auto-ico a[href^="msnim:"]::after {
	content: url(../img/addico/msn.gif);
}

.auto-ico a[href^="xmpp:"]::after {
	content: url(../img/addico/jabber.gif);
}

.auto-ico a[href*="icq.com"]::after {
	content: url(../img/addico/icq.gif);
}

.auto-ico a[href*="edit.yahoo.com/config/send_webmesg?"]::after {
	content: url(../img/addico/yim.gif);
}

.auto-ico a[href^="callto:"]::after {
	content: url(../img/addico/call.gif);
}

.auto-ico a[href^="skype:"]::after {
	content: url(../img/addico/skype.gif);
}

.auto-ico a[href^="gg:"]::after {
	content: url(../img/addico/gadugadu.gif);
}

/* email */
.auto-ico a[href^="mailto:"]::after {
	content: url(../img/addico/mailto.gif);
}

/* 某些链接强制不需要显示链接图标时加这个类 */
.del-link-auto-ico::after, .del-link-auto-ico a::after{
	content: "" !important;
}







/*超出的隐藏并显示省略号，FF7.0以后开始支持，调用这个类的区块要有宽度*/
.ell{
	-o-text-overflow: ellipsis;	/*Opera*/
	text-overflow: ellipsis;	/*IE，FF，Safari，Chorme*/
	overflow: hidden;
	white-space: nowrap;		/*不折行*/
}










/*
	常用em字号换算：
	6px / 16px = 0.375em
	9px / 12px = 0.5625em
	10px / 16px = 0.625em
	11px / 16px = 0.6875em
	12px / 16px = 0.75em
	13px / 16px = 0.8125em
	14px / 16px = 0.875em
	18px / 16px = 1.125em
	20px / 16px = 1.25em

	常用英文网站基础字号：
	font: 0.8125em Helmet, Freesans, sans-serif;
*/
