返回新闻列表

好用的独立响应式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;}
}


推荐技术资料

absolute溢出部分不隐藏 父div加入position:absolute就行

2022-06-20

通常,为了让DIV⼦元素超出部分隐藏,都是在⽗元素设置overflow:hidden,这样即可防⽌⼦元素撑开⽗元素,使⼦元素能够溢出隐藏!但是,对于position:absolute定位的⼦元素,仅仅使⽤overflow:hidden没办法将其溢出部分隐藏,需要在⽗元素上也加上⼀个定位position:relative;才能将含有position:absolute属性的⼦元素进⾏溢出

阅读更多

背景在下面 字体在上面中心透明效果,css属性mix-blend-mode

2023-04-06

效果如下,div代码如下:<div class="h_1"><span>002t.cn<br>DESIGN&amp;<br><b>网站建设</b></span></div>css代码如下:.h_1{ position: absolute; background

阅读更多

SQLite 查询本月的数据和查询多少天之内的数据

2021-11-24

SQLite 查询本月的数据select *from ay_diy_jingxiaoshangwhere create_time between datetime('now','start of month','+1 second') anddatetime('now','start of month','+1 month','-1 second')查询多少天之内的数据,查询365天select *from ay_di

阅读更多

Ajax发送订单信息,会遇到发送了一次,然后在点击发送,不成功的问题,

2024-07-18

根据你提供的代码,看起来你正在使用Ajax来发送订单信息到一个PHP页面,并期望通过PHP页面发送电子邮件。如果第一次发送成功,但第二次发送失败,可能有几个原因需要检查和排除:重复发送问题: 确保每次发送请求时,checkoutString 的内容是正确的,并且你没有意外地覆盖了其他数据。服务器响应问题: 确保PHP页面 http://ww

阅读更多

pbootcms利用扩展标签二次格式化模型字段 -分割多行字段成为faq问答

2023-04-24

分割多行字段成为faq问答,首先先模型字段新增一个多行字段,填写内容如下,问题.答案.@问题1.答案.@@是必备的。因为要拆分二次,一个组一个@然后在,\apps\home\controller/ExtLabelController.php 目录里面添加自定义标签 (扩展标签)添加以下代码/*必备启动函数*/

阅读更多

div li flex空白元素自动填充,自动判断,可控制数量

2022-12-10

// flex空白元素填充 function flex_empty(listbox, ele, num, emptyclass) { var len = listbox.find(ele).length; var need = Math.ceil(len / num) * num - len; &nb

阅读更多

js跑马灯效果 MSClass.js 多行跑马灯 溢出隐藏 可判断手机端

2022-04-29

js跑马灯效果 MSClass.js 多行单行都可以,跑马灯 溢出隐藏 可判断手机端<styletype="text/css">#news-containerli{float:left;list-style-type:none;padding:10px;width:25%;}@mediascreenand(min-width:320px)

阅读更多

PBOOTCMS实现无子栏目自动调用同级栏目或者顶级栏目(支持二/三级栏目)

2023-07-03

今天遇到一个网站有三级栏目,要求是。点击二级显示三级子类。点击三级显示同级别分类,以下代码可以实现,通过判断是否有子类。来判断显示什么级别内容,parent=可以自己按需求来。是下级还是同级还是顶级。{sort:scode}{sort:tcode}{sort:pcode}{pboot:if('{pboot:navpa

阅读更多

PbootCMSV3.2.5后台增加自定义字段搜索,可搜索标题和其他自定义字段

2024-05-24

我们在后台模型里面新增了自定义字段后,然后想要在后台搜索哪里。能搜索。需要处理下。首先打开。apps/admin/model/content/ContentModel.php主要更改二个函数// 查找指定分类及子类文章 public function findContent($mcode, $scode, $keyword)// 在全部栏目查找文章 public function findCont

阅读更多