HTML REM layout, super easy to use on the mobile side, the adaptive effect is very good!

Source: Internet
Author: User

<! DOCTYPE html>

<meta charset= "UTF-8" >
<meta name= "viewport" content= "Width=device-width, initial-scale=1, maximum-scale=1.0, User-scalable=no" >
<title></title>
<link rel= "stylesheet" href= "Css/bootstrap.min.css"/> <!--this is a bootstrap CSS plugin that can be downloaded online--
<style>
body{
font-family: ' Microsoft ya Black ';
Font-size:1rem; /*12px*/
}
. width-1,.width-2,.width-3,.width-4,.width-5,.width-6,
. width-7,.width-8,.width-9,.width-10,.width-11,.width-12,
. width-13,.width-14,.width-15,.width-16,.width-17,.width-18,
. width-19,.width-20,.width-21,.width-22,.width-23,.width-24,
. width-25,.width-26,.width-27,.width-28,.width-29,.width-30,
. width-31,.width-32,.width-33,.width-34,.width-35,.width-36,
. width-37,.width-38,.width-39,.width-40,.width-41,.width-42,
. width-43,.width-44,.width-45,.width-46,.width-47,.width-48,
. width-49,.width-50,.width-51,.width-52,.width-53,.width-54,
. width-55,.width-56,.width-57,.width-58,.width-59,.width-60,
. width-61,.width-62,.width-63,.width-64,.width-65,.width-66,
. width-67,.width-68,.width-69,.width-70,.width-71,.width-72,
. width-73,.width-74,.width-75,.width-76,.width-77,.width-78,
. width-79,.width-80,.width-81,.width-82,.width-83,.width-84,
. width-85,.width-86,.width-87,.width-88,.width-89,.width-90,
. width-91,.width-92,.width-93,.width-94,.width-95,.width-96,
. width-97,.width-98,.width-99,.width-100{
Float:left;
position:relative;
min-height:1px;
padding-left:5px;
padding-right:5px;
}
. width-1{
width:1%;
}

. width-2{
width:2%;
}

. width-3{
width:3%;
}

. width-4{
width:4%;
}

. width-5{
width:5%;
}

. width-6{
width:6%;
}

. width-7{
width:7%;
}

. width-8{
width:8%;
}

. width-9{
width:9%;
}

. width-10{
width:10%;
}

. width-11{
width:11%;
}

. width-12{
width:12%;
}

. width-13{
width:13%;
}

. width-14{
width:14%;
}

. width-15{
width:15%;
}

. width-16{
width:16%;
}

. width-17{
width:17%;
}

. width-18{
width:18%;
}

. width-19{
width:19%;
}

. width-20{
width:20%;
}

. width-21{
width:21%;
}

. width-22{
width:22%;
}

. width-23{
width:23%;
}

. width-24{
width:24%;
}

. width-25{
width:25%;
}

. width-26{
width:26%;
}

. width-27{
width:27%;
}

. width-28{
width:28%;
}

. width-29{
width:29%;
}

. width-30{
width:30%;
}

. width-31{
width:31%;
}

. width-32{
width:32%;
}

. width-33{
width:33%;
}

. width-34{
width:34%;
}

. width-35{
width:35%;
}

. width-36{
width:36%;
}

. width-37{
width:37%;
}

. width-38{
width:38%;
}

. width-39{
width:39%;
}

. width-40{
width:40%;
}

. width-41{
width:41%;
}

. width-42{
width:42%;
}

. width-43{
width:43%;
}

. width-44{
width:44%;
}

. width-45{
width:45%;
}

. width-46{
width:46%;
}

. width-47{
width:47%;
}

. width-48{
width:48%;
}

. width-49{
width:49%;
}

. width-50{
width:50%;
}

. width-51{
width:51%;
}

. width-52{
width:52%;
}

. width-53{
width:53%;
}

. width-54{
width:54%;
}

. width-55{
width:55%;
}

. width-56{
width:56%;
}

. width-57{
width:57%;
}

. width-58{
width:58%;
}

. width-59{
width:59%;
}

. width-60{
width:60%;
}

. width-61{
width:61%;
}

. width-62{
width:62%;
}

. width-63{
width:63%;
}

. width-64{
width:64%;
}

. width-65{
width:65%;
}

. width-66{
width:66%;
}

. width-67{
width:67%;
}

. width-68{
width:68%;
}

. width-69{
width:69%;
}

. width-70{
width:70%;
}

. width-71{
width:71%;
}

. width-72{
width:72%;
}

. width-73{
width:73%;
}

. width-74{
width:74%;
}

. width-75{
width:75%;
}

. width-76{
width:76%;
}

. width-77{
width:77%;
}

. width-78{
width:78%;
}

. width-79{
width:79%;
}

. width-80{
width:80%;
}

. width-81{
width:81%;
}

. width-82{
width:82%;
}

. width-83{
width:83%;
}

. width-84{
width:84%;
}

. width-85{
width:85%;
}

. width-86{
width:86%;
}

. width-87{
width:87%;
}

. width-88{
width:88%;
}

. width-89{
width:89%;
}

. width-90{
width:90%;
}

. width-91{
width:91%;
}

. width-92{
width:92%;
}

. width-93{
width:93%;
}

. width-94{
width:94%;
}

. width-95{
width:95%;
}

. width-96{
width:96%;
}

. width-97{
width:97%;
}

. width-98{
width:98%;
}

. width-99{
width:99%;
}

. width-100{
width:100%;
}
. eventcover{
Height:11rem;
Background:url (".. /img/6.jpg ");
Background-size:cover;
background-position-y:50%;
position:relative;
opacity:0;
}
. changecover{
width:15%;
Position:absolute;
left:0;
right:0;
Margin:auto;
Bottom:1rem;
}
. gather{
Font-size:0.65rem;
Padding-top:0.8rem;
Padding-bottom:0.8rem;
border-top:1px solid #E0E0E0;
opacity:0;
}
. inputstyle{
width:95%;
height:100%;
Border:none;
Padding-top:0.25rem;
Padding-bottom:0.25rem;
Outline:none;
}
. gatherline{
Height:0.9rem;
Background: #eeeeee;
border-top:1px solid #E0E0E0;
}
. border-bottom{
border-bottom:1px solid #E0E0E0;
}
. border-left{
border-left:1px solid #E0E0E0;
}
. box{
border-bottom:1px solid #E0E0E0;
border-top:1px solid #E0E0E0;
Padding:0.8rem;
padding-bottom:0;
Height:6.9rem;
Transition:all 0.3s linear;
}
. edit{
opacity:0;
}
. Edit >.width-50{
Padding-top:0.6rem;
Padding-bottom:0.6rem;
border-left:1px solid #E0E0E0;
}
. font-box{
Border-radius:0.4rem;
border:1px solid #E0E0E0;
Background: #ececec;
Margin-bottom:0.8rem;
opacity:0;
Height:5rem;
Transition:all 0.1s linear;
position:relative;
}
. Font-box textarea{
Border:none;
width:100%;
Resize:none;
Outline:none;
Padding:0.5rem;
height:100%;
Background: #ececec;
Font-size:0.7rem;
Border-radius:0.4rem;
}
. gatherlinetwo{
Height:1.8rem;
Background: #eeeeee;
}
. block{
Transition:all 0.2s linear;
Opacity:1;
}
. none{
opacity:0;
}
. bmtj{
Font-size:0.8rem;
Padding-top:0.7rem;
Padding-bottom:0.7rem;
Padding-left:0.5rem;
Padding-right:0.5rem;
Color: #999;
}
. paddingone{
Padding-top:0.2rem;
Padding-bottom:0.2rem;
}
. content{
Display:block;
}

. wc{
Background: #E0E0E0;

}
. wc1{
Padding-top:1.8rem;
Padding-left:1.5rem;
Padding-right:1.5rem;
Padding-bottom:1rem;
}
. wcbtn{
width:100%;
Padding-top:0.6rem;
Padding-bottom:0.6rem;
Background: #30B3F7;
Border:none;
Border-radius:0.2rem;
Font-size:1rem;
Color: #ffffff;
}
. warn{
Font-size:0.7rem;
Color: #888;
}
. del{
Height:1.3rem;
Width:1.3rem;
Position:absolute;
Right:0.1rem;
Top: -0.8rem;
}

</style>
<script src= "Js/jquery1.11.1.min.js" ></script>
<script src= "Js/bootstrap.min.js" ></script> <!--this is the JS plugin for bootstrap, which can be downloaded on-line
<script src= "Js/jgestures.js" ></script> <!--this is a jquery gesture plugin that can be downloaded online--

<body>
<!--head Cover--

<div class= "Container-fluid" >
<div class= "Row Eventcover" >
<div class= "Changecover" >

</div>
</div>
</div>

<!--Central Content--
<content class= "Content" >
<div class= "Container-fluid" >
<div class= "Row Gather" >
<div class= "Width-15 text-center" >

</div>
<div class= "width-85" >
<input class= "Inputstyle" type= "text" placeholder= "active theme"/>
</div>
</div>
<div class= "Row Gatherline" ></div>
<div class= "Row Gather" >
<div class= "Width-15 text-center" >

</div>
<div class= "width-85" >
<input class= "Inputstyle" type= "text" placeholder= "Active Time"/>
</div>
</div>
<div class= "Row Gather" >
<div class= "Width-15 text-center" >

</div>
<div class= "width-85" >
<input class= "Inputstyle" type= "text" placeholder= "event location"/>
</div>
</div>
<div class= "Row gatherline borderbottom" ></div>
</div>
</content>
<!--editing section--
<main>
<div class= "Container-fluid" >
<div class= "Row box" >
<div class= "width-100 font-box" >
<textarea rows= "5" placeholder= "Please enter text ..." ></textarea>
<div class= "Del" >

</div>
</div>
</div>
<div class= "Row edit Text-center Border-bottom" >
<div class= "Width-50 Tjwzk" >

</div>
<div class= "Width-50" >

</div>
</div>
<div class= "Row Gatherlinetwo" ></div>
<div class= "Row BMTJ" >
<div class= "width-15 text-center" ></div>
<div class= "width-70 paddingone" > Set registration Conditions </div>
<div class= "width-15 text-center" ></div>
</div>
</div>
</main>
<footer>
<div class= "Container-fluid" >
<div class= "Row WC" >
<div class= "width-100 WC1" >
<button class= "WCBTN" > Completion </button>
</div>
<div class= "width-100 WC2" >
<p class= "Warn Text-center" > Pro: You must know that here we reject all illegal activities </p>
</div>
</div>
</div>
</footer>
<script>
$ (function () {
(function (Debug) {
var fun=new Function ();
fun.prototype={
Getresize:function () {
var docwidth = document.documentElement.clientWidth;
var html = document.queryselector (' html ');
Html.style.fontSize = (DOCWIDTH/20) + "px";
},
Addclass:function (obj,classname,callback,settime) {
var that=this;
if (Arguments[2]) {
This.callback=callback;
}else{
if (debug) alert (' Missing callback callback parameter ');
};
if (Arguments[0]) {
Obj.addclass (ClassName);
SetTimeout (function () {
Callback (that)
},settime*1000)
}else{
if (debug) alert (' missing obj parameter ');
};
},
Removeclass:function (obj,classname,callback,settime) {
var that=this;
if (Arguments[2]) {
This.callback=callback;
}else{
if (debug) alert (' Missing callback callback parameter ');
};
if (Arguments[0]) {
Obj.removeclass (ClassName);
SetTimeout (function () {
Callback (that)
},settime*1000)
}else{
if (debug) alert (' missing obj parameter ');
};
}
};
Window.fun=function () {
return new Fun ();
};
}) (false);

var gather=fun ();
Adapt to the screen
Gather.getresize ();
$ (window). Resize (function () {
Gather.getresize ();
});
Show page elements
Gather.addclass ($ ('. Eventcover '), ' block ', function () {
Gather.addclass ($ ('. Gather '), ' block ', function () {
Gather.addclass ($ ('. Font-box '), ' block ', function () {
Gather.addclass ($ ('. Edit '), ' block ', function () {
},0.3)
},0.3)
},0.3)
},0.3)
var guid=0;
$ ('. Tjwzk '). On (' Tapone ', function () {
if (guid==0) {
guid=1;
var wzhp= ' <div class= "width-100 font-box" > ' +
' <textarea rows= ' 5 "placeholder=" Please enter text ... "></textarea>" +
' <div class= ' del ' > ' +
' ' +
' </div> '
' </div> ';
$ ('. Box '). CSS ({
Height:parsefloat ($ ('. Box '). CSS (' height '). Split (' px ') [0]) +5.8*parsefloat ($ (' HTML '). CSS (' font-size '). Split (' px ') ) [0])
});
SetTimeout (function () {
$ ('. Box '). Append (WZHP);
SetTimeout (function () {
$ ('. Font-box:last-child '). AddClass (' block ')
},1)
Guid=0;
},500)
};
})

var range = 50;
var elemt = 500;
var maxnum = 10000;
var num = 1;
var totalheight = 0;
$ (window). On (' Swipemove ', function (A, b) {
var direction=b.description.split (":");
direction= direction[Direction.length-1];
if (direction== "up") {
var Srollpos = $ (window). scrolltop (),
Totalheight = parsefloat ($ (window). Height ()) + parsefloat (srollpos);
if ($ (document). Height ()-range) <= totalheight && num! = maxnum) {
Console.log (' Load data ')
num++;
// };
// };
//});

});
   </script>
</body>

HTML REM layout, super easy to use on the mobile side, the adaptive effect is very good!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.