返回新闻列表

好用的独立响应式css

发布日期: 2024-03-10 | 来源: 智软设计工作室


好用的独立响应式css,网站制作的时候很方便,@media响应式也也好了。在配合独立的格栅系统 ,就好用了。不用加载其他css框架梁 https://www.002t.cn/jishuwenzhang/108.html

如果要用rem布局。在加载一个js响应式设置html字体大小。 https://www.002t.cn/jishuwenzhang/109.html 

/*重置标签*/
html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;line-height:1.15;-webkit-tap-highlight-color: rgba(0,0,0,0);font-size: 100px;}
body{margin:0;font-family: "Microsoft Yahei",PingFangSC-Regular,"Helvetica Neue",Helvetica,Arial,"Hiragino Sans GB","Heiti SC","WenQuanYi Micro Hei",sans-serif;line-height: 1.42857143;font-size: 16px;min-width: 1230px;background: #fff;color: #202a52;}
h1{font-size:2em;margin:.67em 0;}
h2,h3,h4{margin: 0;}
figure{margin:1em 40px;}
hr{box-sizing:content-box;height:0;overflow:visible;}
a{-webkit-text-decoration-skip:objects;background-color:transparent;}
abbr[title]{border-bottom:none;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}
b,strong{font-weight:bolder;}
dfn{font-style:italic;}
mark{background-color:#ff0;color:#000;}
small{font-size:80%;}
sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline;}
sub{bottom:-.25em;}
sup{top:-.5em;}
audio:not([controls]){display:none;height:0;}
img{border-style:none;max-width:100%;}
svg:not(:root){overflow:hidden;}
button,input,optgroup,select,textarea{line-height:1.42857143;margin:0;outline: none;}
body, button, input, select, textarea {text-rendering: optimizeLegibility;-webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: grayscale;-moz-font-feature-settings: "liga","kern";}
button,input{overflow:visible;}
button,select{text-transform:none;}
button,html [type=button],/* 1 */
[type=reset],[type=submit]{-webkit-appearance:button;}
button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0;}
button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText;}
fieldset{padding:.35em .75em .625em;}
legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}
progress{display:inline-block;vertical-align:baseline;}
textarea{overflow:auto;}
[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}
[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto;}
[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}
[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none;}
::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}
summary{display:list-item;}
article,aside,footer,header,nav,section,figcaption,figure,main,details,/* 1 */
menu{display:block;}
pre,code,kbd,samp{font-family:monospace, monospace;font-size:1em;}
audio,video,canvas{display:inline-block;}
template,[hidden]{display:none;}
.clearfix{zoom:1;}
.clearfix:before,.clearfix:after{display:table;line-height:0;content:"";}
.clearfix:after{clear:both;}
a {color: #333;text-decoration: none;}
a:hover {color: #202a52;}
ul {margin: 0;list-style: none;padding: 0;}


/*pc*/
.container {padding: 0 20px;width: 1140px;margin: 0 auto;}


/*ipad pro */
@media(max-width: 1280px) and (min-width: 1024px){
  html{font-size: 80px!important;}
  body{min-width: 100%;}
  .container{width: 100%;}
}

/*ipad mini air*/
@media(max-width: 1023px){
  html{font-size: 100px;}
  body{min-width: 100%;}
  .container{width: 100%;}

}
/*手机*/
@media screen and (max-width: 767px) {
    body {min-width: 320px;padding-top: 50px;padding-bottom: 50px;}
    .container {width: auto;}
}


推荐技术资料

pbootcms实现瀑布流“ajax加载更多”“无限下拉”分页调用列表,支持动静态,支持图片延迟加载

2024-05-09

pbootcms实现瀑布流“ajax加载更多”“无限下拉”分页调用列表,,支持动静态,支持图片延迟加载1、页面中引用jquery.js 与 jquery-ias.min.js注意:jquery.js库版本必须大于1.6<scriptsrc='/js/jquery.js'></script><scriptsrc="/js/jquery-ias.min.js"></script>2

阅读更多

asp获取ip判断用户属于什么国家

2024-03-14

免费的api不用注册每天最多查询1000次,小流量网站够用,大流量可以自己买套餐OnErrorResumeNextDimipAddress,field'获取客户端真实IP地址IfNotRequest.ServerVariables("HTTP_X_FORWARDED_FOR")=""ThenipAddress&nb

阅读更多

ueditor 编辑器会删除data:image/png;base64图片类型 ,修改方法

2023-06-27

进入ueditor.all.js,注销一下一下红框代码,

阅读更多

取消pbootcms首页加入了?参数后 301重定向问题!解决谷歌google ads广告不符合条件问题

2024-03-22

if($matches1[0]){if($_SERVER['REQUEST_URI']==$matches1[0]){$this->getIndexPage();&nbs

阅读更多

Bootstrap导航条 点击li菜单后,自动收回折叠整个菜单

2023-06-05

Bootstrap导航条 点击(单击Navbar)li菜单后,自动收回折叠整个菜单,利用jq做的。点击后再次错误,菜单按钮点击事件,<script>vara=document.querySelector(".navbar-toggler"); 

阅读更多

js按照宽高比例设定html字体 css排版的时候用rem单位设置字体

2024-03-10

css排版的时候用rem单位设置字体font-size: 0.42rem;更好更方便的适配字体大小。/*#按照宽高比例设定html字体,width=device-widthinitial-scale=1版#@pargamwin窗口window对象#@pargamoption{designWidth:设计稿宽度,必须

阅读更多

TP5 where数组查询(有多个查询条件)

2021-09-29

有查询条件就查询,多个查询条件,只要有查询,就增加一个查询条件//类型if($sotype){$where['type']=$sotype;}//合作单位if($companyid){&

阅读更多

获取用户是否缩放网站,解决浏览器缩放后position: absolute;背景移位问题,导致元素和字体对不齐,

2023-08-30

最近在帮一个客户制作网站的时候。发现一个问题,就是客户设计稿里面有非常个性的背景,背景上面有一些图标或者文字在上面,又想要文字图标动起来, 所以要做背景然后绝对定位,但是做完后。给客户,客户截图说没对齐。移位了。我也是很奇怪。一开始以为是兼容的问题,但是发现客户是一样的浏览器,在查了下代码。看起来没问

阅读更多

pboot:tags标签 显示当前页面的 tags

2021-10-18

直接写id参数当前页的{content:id}就行了。{pboot:tags id={content:id}}&nbsp;<a href='[tags:link]' class='tagc[field:highlight /]'>[tags:text]</a>{/pboot:tags}

阅读更多