@charset "utf-8";
/* 禁用iPhone中Safari的字号自动调整 */
html {
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
/* 解决IOS默认滑动很卡的情况 */
-webkit-overflow-scrolling : touch;
}
html,body{
width: 100%;
height: 100%;
}
/* 禁止缩放表单 */
input[type="submit"], input[type="reset"], input[type="button"], input {
resize: none;
border: none;
}
/* 取消链接高亮 */
body, div, ul, li, ol, h1, h2, h3, h4, h5, h6, input, textarea, select, p, dl, dt, dd, a, img, button, form, table, th, tr, td, tbody, article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
/* 设置元素为块 */
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section ,a{
display: block;
}
/* 图片自适应 */
img {
width: 100%;
height: auto;
width: auto\9; /* ie8 */
display: block;
-ms-interpolation-mode: bicubic;/*为了照顾ie图片缩放失真*/
}
/* 初始化 */
body, div, ul, li, ol, h1, h2, h3, h4, h5, h6, input, textarea, select, p, dl, dt, dd, a, img, button, form, table, th, tr, td, tbody, article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
margin: 0;
padding: 0;
}
body {
font: 12px/1.5 'Microsoft YaHei','宋体', Tahoma, Arial, sans-serif;
color: #333;
background-color: #F7F7F7;
}
em, i {
font-style: normal;
}
ul,li{
list-style: none;
}
strong {
font-weight: normal;
}
.clearfix:after {
content: "";
display: block;
visibility: hidden;
height: 0;
clear: both;
}
.clearfix {
zoom: 1;
}
a {
text-decoration: none;
color: #969696;
font-family: 'Microsoft YaHei', Tahoma, Arial, sans-serif;
}
a:hover {
text-decoration: none;
}
ul, ol {
list-style: none;
}
h1, h2, h3, h4, h5, h6 {
font-size: 100%;
font-family: 'Microsoft YaHei';
}
img {
border: none;
}
input{
font-family: 'Microsoft YaHei';
}
/*单行溢出*/
.one-txt-cut{
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
/*多行溢出 手机端使用*/
.txt-cut{
overflow : hidden;
text-overflow: ellipsis;
display: -webkit-box;
/* -webkit-line-clamp: 2; */
-webkit-box-orient: vertical;
}
/* 移动端点击a链接出现蓝色背景问题解决 */
a:link,a:active,a:visited,a:hover {
background: none;
-webkit-tap-highlight-color: rgba(0,0,0,0);
-webkit-tap-highlight-color: transparent;
}
.w50{
width: 50%;
}
.w25{
width: 25%;
}
.w20{
width: 20%;
}
.w33{
width: 33.333333%;
}
.fl{
float: left;
}
.fr{
float: right;
}
.db{
display: block !important;
}
.dn{
display: none;
}
/*字体图标*/
@font-face {
font-family: 'iconfont'; /* project id 350792 */
src: url('//at.alicdn.com/t/font_350792_yk2sh4le9k.eot');
src: url('//at.alicdn.com/t/font_350792_yk2sh4le9k.eot?#iefix') format('embedded-opentype'),
url('//at.alicdn.com/t/font_350792_yk2sh4le9k.woff') format('woff'),
url('//at.alicdn.com/t/font_350792_yk2sh4le9k.ttf') format('truetype'),
url('//at.alicdn.com/t/font_350792_yk2sh4le9k.svg#iconfont') format('svg');
}
.iconfont{
font-family:"iconfont" !important;
font-size:16px;font-style:normal;
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;
}
/*iphone x 媒体查询*/
@media only screen and (width: 375px) and (height: 690px){
body {
background:#555555;
}
}
textarea::-webkit-input-placeholder { /* WebKit browsers */
color: #999;
}
textarea::-moz-placeholder { /* Mozilla Firefox 4 to 18 */
color: #999;
}
textarea::-moz-placeholder { /* Mozilla Firefox 19+ */
color: #999;
}
textarea::-ms-input-placeholder { /* Internet Explorer 10+ */
color: #999;
}
移动端public.css
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
推荐阅读更多精彩内容
- 一.移动端css兼容性的解决思路 买服务器,利用域名进行访问测试。 加浏览器内核前缀例如,有些手机浏览器不支持@k...
- 在开发的过程中遇到的一些移动端的兼容性问题,以后会陆续的总结增加 不让用户选择文本 设置select文字的位置,靠...
- 效果图如下: 这里主要是利用了 transform:scale(0.5) 先把边框设置为200%,然后在缩小50%...
- 最近工作中制作移动端活动页面的时候,由于图片较多,因此频繁使用到CSS Sprites,此时会遇到了一个常见问题—...