zoukankan      html  css  js  c++  java
  • html 居中的内容显示框

    <!doctype html>
    <html lang="en">
     <head>
      <meta charset="UTF-8">
      <meta name="Generator" content="EditPlus®">
      <meta name="Author" content="">
      <meta name="Keywords" content="">
      <meta name="Description" content="">
      <title>Document</title>
      <style>
        html,body
        {
            height: 100%;
            overflow: hidden;
        }
        body,div,h2{
            margin: 0;
    
        }
        center{
            padding-top: 10px;
        }
        button{
            cursor: pointer;
        }
        #outer{
            position: fixed;
            top: 0;
            left: 0;
             5%;
            height: 100%;
            background: #000;
            opacity: 0.5;
            filter:alpha(opacity=50);
            display: block;
        }
        #windows{
            position: absolute;
            top: 50%;
            left: 50%;
             50%;
            height: 45%;
            background: #fff;
            border: 4px solid #F90;
            overflow: hidden;
            transform: translate3d(-50%, -50%, 0);
            display: block;
        }
        h2{
            text-align: right;
            background: #FC0;
            border-bottom: 3px solid #F90;
        }
        h2 span{
            color: #F90;
            cursor: pointer;
            background: #FFF;
            border: 1px solid #F90;
            padding: 0 2px;
        }
        p{
            text-align: justify;
            text-indent: 2em;
        }
    </style>
     
     </head>
     <body>
    <div id="windows">
        <h2>title<span id="close">*</span></h2>
        <p>测试平台测试平台测试平台测试平台测试平台测试测试平台</p>
    </div>
     </body>
    </html>
    

      

  • 相关阅读:
    网络编程
    反射函数与元类
    面向对象进阶
    对象的封装与接口
    对象继承
    面向对象
    包,logging模块与haslib模块
    闭包函数及装饰器
    函数对象、函数的嵌套、名称空间及作用域
    函数简介及函数参数介绍
  • 原文地址:https://www.cnblogs.com/sea-stream/p/9893629.html
Copyright © 2011-2022 走看看