JQUERY+DIV+CSS-based Implementation pop-up login window (code is super simple) _jquery

Source: Internet
Author: User

Details of the specific code are as follows:

The basic idea first hides (Dispaly:none) again displays, the translucent mask layer passes

z-index:9998;
z-index:9999;

The bigger the value, the higher the front.

Index.html

<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">  

  css file jiaobenzhijia.css

Body, H1, H2, H3, H4, H5, H6, p, blockquote, Pre, Code, Del, DFN, EM, IMG, strong, DD, DL, DT, Li, OL, UL, FieldSet, form
  , label, button, input, table, caption, Tbody, TFOOT, THEAD, tr, Th, TD, Menu {margin:0;
padding:0; } article, aside, details, figcaption, figure, Footer, header, Hgroup, nav, section {display:block} audio, canvas, vid EO {display:inline-block *display:inline *zoom:1} audio:not ([controls]) {Display:none} table {Border-collapse:c
  Ollapse;
  border-spacing:0; Empty-cells:show} OL, UL, menu {List-style:none} img {border:0} a:focus {Outline:none} em, I {font-style:
Normal
  button, input, select, textarea {font-size:100%;
  margin:0;
  vertical-align:-3px;
Outline:none;
  button, input {border:1px solid;
  Outline:none;
Line-height:normal; *overflow:visible} Button::-moz-focus-inner, Input::-moz-focus-inner {border:0; padding:0} button, input[type= "
 Button "], input[type=" reset "], input[type=" Submit "] {Cursor:pointer; -webkit-appearance:button} input[type= "Search"] {-webkit-appearance:textfield;
  -webkit-box-sizing:content-box;
  -moz-box-sizing:content-box;
  Box-sizing:content-box} input[type= "Search"]::-webkit-search-decoration {-webkit-appearance:none} textarea {
  Overflow:auto; Vertical-align:top}:: Selection {background: #72d0eb; color: #fff; Text-shadow:none}::-moz-selection {background:#
72D0EB;
Color: #fff;
  Text-shadow:none} *[hidden] {Display:none} a {color: #0088DB;
  Text-decoration:none; Cursor:pointer} a:hover {color: #2A5E8E}. Clearfix:after,. Central:after,. Widget Ul:after,. Paging:after,. Pagenav:af
  ter,. base-tit:after {content: ".";
  Display:block;
  height:0;
  Clear:both; Visibility:hidden}. Clearfix,. The widget ul,. Paging,. Pagenav,. base-tit {*+height:1%;} body, button, input, SE
  Lect, textarea, code {font-size:12px;
  Font-family:microsoft Yahei;
Color: #444;
  /*window*//* Input/* IPT {border:solid 1px #d2d2d2; Border-leFt-color: #ccc;
  Border-top-color: #ccc;
  border-radius:2px;
  Box-shadow:inset 0 1px 0 #f8f8f8;
  Background-color: #fff;
  PADDING:4PX 6px;
  height:21px;
  line-height:21px;
  Color: #555;
  width:180px;
Vertical-align:baseline;
  }. Ipt-mini {width:140px;
PADDING:1PX 3px;
  }. Ipt:focus {border-color: #95C8F1;
box-shadow:0 0 4px #95C8F1;
  }/* BTN/* BTN {position:relative;
  Cursor:pointer;
  Display:inline-block;
  Vertical-align:middle;
  font-size:12px;
  Font-weight:bold;
  height:27px;
  line-height:27px;
  min-width:52px;
  Padding:0 12px;
  Text-align:center;
  Text-decoration:none;
  border-radius:2px;
  border:1px solid #ddd;
  Color: #666;
  Background-color: #f5f5f5;
  Background:-webkit-linear-gradient (top, #F5F5F5, #F1F1F1);
  Background:-moz-linear-gradient (top, #F5F5F5, #F1F1F1);
Background:linear-gradient (Top, #F5F5F5, #F1F1F1);
  } input.btn {height:29px}. btn:hover {border-color: #c6c6c6;
  Color: #333; background-Color: #f8f8f8;
  Background:-webkit-linear-gradient (Top, #f8f8f8, #f1f1f1);
  Background:-moz-linear-gradient (Top, #f8f8f8, #f1f1f1);
  Background:linear-gradient (Top, #f8f8f8, #f1f1f1);
Box-shadow: #ddd 0 1px 1px 0;
  }. btn:active,. btn.btn-active {box-shadow: #ddd 0 1px 2px 0 inset;
Border-color: #c6c6c6;
  }. Btn:focus {border-color: #4d90fe;
  Outline:none}. btn-primary {border-color: #3079ED;
  Color: #F3F7FC;
  Background-color: #4D90FE;
  Background:-webkit-linear-gradient (top, #4D90FE, #4787ED);
  Background:-moz-linear-gradient (top, #4D90FE, #4787ED);
Background:linear-gradient (Top, #4D90FE, #4787ED);
  }. btn-primary:hover {border-color: #2F5BB7;
  Color: #fff;
  Background-color: #4D90FE;
  Background:-webkit-linear-gradient (top, #4D90FE, #357AE8);
  Background:-moz-linear-gradient (top, #4D90FE, #357AE8);
Background:linear-gradient (Top, #4D90FE, #357AE8);
  }. btn-primary:active,. btn-primary.btn-active {box-shadow: #2176D3 0 1px 2px 0 inset; Border-color:#3079ED;
  }. Btn-primary:focus {border-color: #4d90fe;
  Outline:none}. theme-buy {margin-top:10%;
Text-align:center;
  }. Theme-gobuy,. theme-signin {font-size:15px;}. theme-price {position:relative;
  Bottom: -6px;
  Font-family:microsoft Yahei, Arial, Helvetica, Sans-serif;
  margin-right:20px;
  Font-weight:bold;
  Color: #f60;
  line-height:32px;
  font-size:24px;
Display:inline-block;
  }. theme-price DFN {font-style:normal;
  font-size:18px;
margin-right:2px;
  }. Theme-desc {padding:30px}. theme-version {padding:30px;}. theme-popover-mask {z-index:9998;
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  Background: #000;
  opacity:0.4;
  Filter:alpha (OPACITY=40);
  Display:none}. theme-popover {z-index:9999;
  position:fixed;
  top:50%;
  left:50%;
  width:660px;
  height:360px;
  margin:-180px 0 0-330px;
  border-radius:5px;
  Border:solid 2px #666;
  Background-color: #fff;
  Display:none; box-shadow:0 0 10px #666;
  }. theme-poptit {border-bottom:1px solid #ddd;
  padding:12px;
position:relative;
  }. theme-popbod {padding:60px 15px;
  Color: #444;
height:148px;
  }. Theme-popbom {padding:15px;
  Background-color: #f6f6f6;
  border-top:1px solid #ddd; border-radius:0
  0 5px 5px;
  Color: #666}. Theme-popbom a {margin-left:8px}. theme-poptit. close {float:right;
  Color: #999;
  padding:5px;
  margin:-2px-5px-5px;
  Font:bold 14px/14px SimSun; text-shadow:0
  1px 0 #ddd}. theme-poptit. close:hover {color: #444;} btn.theme-reg {position:absolute;
  top:8px;
  left:43%;
  Display:none} Inp-gray,. feed-mail-inp {border:1px solid #ccc;
  Background-color: #fdfdfd;
  width:220px;
  height:16px;
  padding:4px;
  Color: #444;
  MARGIN-RIGHT:6PX}. dform {padding:80px 60px 40px;
Text-align:center;
  }. Dform. ipt_error {background-color: #FFFFCC;
  Border-color: #FFCC66} dform-tip {display:none;
  Background-color: #080;
  Color: #fff;
  line-height:42px; Margin-top:10px;
font-size:14px;
  }. dform-tip-errer {background-color: #CF301A;} dform-tip a {display:inline-block;
  Padding:0 20px;
  margin-left:10px;
  Background-color: #FFE924;
Color: #CF301A;
  }. dform-login {padding:0;
  height:270px;
Overflow:hidden;
  }. dform-login iframe {height:470px;
Margin-top: -180px;
  }. theme-signin {margin: -50px-20px-50px 90px;
  Text-align:left;
font-size:14px;
  }. Theme-signin h4 {color: #999;
  font-weight:100;
  margin-bottom:20px;
font-size:12px;
  }. theme-signin Li {padding-left:80px;
margin-bottom:15px;
  }. Theme-signin Li strong {float:left;
  Margin-left: -80px;
  width:80px;
  Text-align:right;
line-height:32px;
  }. Theme-signin. btn {margin-bottom:10px}. theme-signin p {font-size:12px;
Color: #999; }. Theme-desc,. theme-version {padding-top:0}/*

The above code is small for everyone to share based on JQUERY+DIV+CSS implementation pop-up login window, the code is very simple, I hope to be useful to everyone.

Related Article

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.