WebApp--基础搭建

简介: 主页面设置 Test ...
  1. 主页面设置
<!DOCTYPE html>
<html>

    <head>
        <title>Test</title>
        
        <!--设置浏览器编码类型-->
        <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
        <meta http-equiv="content-type" content="application/xhtml+xml;charset=UTF-8" />
                
        <!--清楚浏览器缓存-->
        <meta http-equiv="Pragma" content="no-cache" />
        <meta http-equiv="Cache-Control" content="no-cache, must-revalidate" />
        <meta http-equiv="expires" content="Wed, 26 Feb 1997 08:21:57 GMT" />
        
        <!--禁止浏览器缩放-->
        <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
        <!--iPhone手机上设置手机号码不被显示为拨号链接-->
        <meta content="telephone=no, address=no" name="format-detection" />
        <!--ios私有属性,可以添加到主屏幕-->
        <meta name="apple-mobile-web-app-capable" content="yes" />
        <!--ios私有属性,网站开启对web app的支持-->
        <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
        <meta name="layoutmode" content="standard" />
        <meta name="renderer" content="webkit" />
        <!--uc浏览器判断到页面上文字居多时,会自动放大字体优化移动用户体验。添加以下头部可以禁用掉该优化-->
        <meta name="wap-font-scale" content="no">
        <meta content="telephone=no" name="format-detection" />

        
        <!--让IE8,IE9,支持Html5和Css3-->
        <!--[if lte IE 8]>
            <script src="scripts/selectivizr.js"></script>
        <![endif]-->
        <!--让IE9一下的浏览器支持Html5标签和媒体查询器(主要用于响应式网站开发)-->
        <!--[if lt IE 9]>
            <script src="scripts/css3-mediaqueries.js"></script>
            <script src="scripts/html5shiv.js"></script>
        <![endif]-->
        <!-- 重置样式 -->
        <link type="text/css" href="css/reset.css" rel="stylesheet" />
        <!-- 主样式 -->
        <link type="text/css" href="css/common.css" rel="stylesheet" />
        <!-- Jquery库 -->
        <!--<script type="text/javascript" src="scripts/jquery-1.11.1.min.js"></script>-->
        <!-- 手机触摸 -->
        <!--<script type="text/javascript" src="scripts/hammer.js"></script>-->

        <style>
            header {
                background-color: black;
                color: white;
                text-align: center;
                padding: 0px;
/*              padding: 5px;*/
            }
            
            nav {
                line-height: 30px;
                background-color: #eeeeee;
                height: 300px;
                width: 100px;
                float: left;
                padding: 0px;
                /*padding: 5px;*/
            }
            
            section {
                width: 350px;
                float: left;
                padding: 0px;
                /*padding: 10px;*/
            }
            
            footer {
                background-color: black;
                color: white;
                clear: both;
                text-align: center;
                padding: 0px;
                /*padding: 5px;*/
            }
        </style>
    </head>

    <body>

        <header>
            <h1>City Gallery</h1>
        </header>

        <nav>
            London<br> 
            Paris<br>
            Tokyo<br>
        </nav>

        <section>
            <h1>London</h1>
            <p>
                London is the capital city of England. It is the most populous city in the United Kingdom, with a metropolitan area of over 13 million inhabitants.
            </p>
            <p>
                Standing on the River Thames, London has been a major settlement for two millennia, its history going back to its founding by the Romans, who named it Londinium.
            </p>
        </section>

        <footer>
            Copyright W3School.com.cn
        </footer>

    </body>

</html>
  1. 引用的common.css文件
/* 禁用iPhone中Safari的字号自动调整 */

html {
    -webkit-text-size-adjust: none;
}


/* 设置HTML5元素为块 */

article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
    display: block;
}


/* 设置图片视频等自适应调整 */

img {
    max-width: 100%;
    height: auto;
    width: auto9;
    /* ie8 */
}

.video embed,
.video object,
.video iframe {
    width: 100%;
    height: auto;
}

body {
    font: 14px/22px "Georgia", Helvetica, Arial, sans-serif;
    background: #fff;
    color: #595959;
    overflow-y: scroll;
    overflow-x: hidden;
    *overflow-y: auto !important;
}

a {
    text-decoration: none;
    cursor: pointer;
}

.Wrapper {
    width: 100%;
    padding: 0;
    margin: 0;
}

li {
    list-style: none;
}

a {
    text-decoration: none;
    color: #555756;
}

a:hover {
    color: #141414;
    text-decoration: none;
}

a img {
    border: none;
}

a>img {
    vertical-align: bottom;
}

.min-height {
    min-height: 0;
    height: auto;
    _height: 0;
    overflow: hidden;
    _overflow: visible;
}

.position-absolute {
    position: absolute;
}

.position-relative {
    position: relative;
}

.overflow-hidden {
    overflow: hidden;
}


/*
 * -----------------------------------------
 *  320 ~ 480
 * -----------------------------------------
 */

@media only screen and (min-width: 320px) and (max-width: 480px) {}


/*
 * -----------------------------------------
 *  321 ~   宽大于321的设备
 * -----------------------------------------
 */

@media only screen and (min-width: 321px) {}


/*
 * -----------------------------------------
 *  ~ 320  宽小于320的设备
 * -----------------------------------------
 */

@media only screen and (max-width: 320px) {}


/*
 * -----------------------------------------
 *  ~ 480  宽小于480的设备
 * -----------------------------------------
 */

@media only screen and (max-width: 480px) {}


/* medium screens (excludes iPad & iPhone) */


/*
 * -----------------------------------------
 * 481 ~ 767  宽大于480且小于767的iPad和iPhone
 * -----------------------------------------
 */

@media only screen and (min-width: 481px) and (max-width: 767px) {}


/* ipads (portrait and landscape) */


/*
 * -----------------------------------------
 * 768 ~ 1024  宽大于480且小于1024的iPad和iPhone
 * -----------------------------------------
 */

@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) {}


/* ipads (landscape) */


/*
 * -----------------------------------------
 * 768 ~ 1024  宽大于480且小于1024的iPad和iPhone
 * -----------------------------------------
 */

@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: landscape) {}


/* ipads (portrait) */


/*
 * -----------------------------------------
 * 768 ~ 1024  宽大于480且小于1024的iPad和iPhone
 * -----------------------------------------
 */

@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: portrait) {}


/*
 * -----------------------------------------
 * 1444 ~ 1824  宽大于1444且小于1824的设备
 * -----------------------------------------
 */

@media only screen and (min-width: 1444px) and (max-width: 1824px) {}


/*
 * -----------------------------------------
 * 1824 ~  宽大于1824的设备
 * -----------------------------------------
 */

@media only screen and (min-width: 1824px) {}


/*
 * -----------------------------------------
 * 2224 ~  宽大于2224的设备
 * -----------------------------------------
 */

@media only screen and (min-width: 2224px) {}


/* iphone 4 and high pixel ratio (1.5+) devices */


/*
 * -----------------------------------------
 * iphone4 ~
 * -----------------------------------------
 */

@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
only screen and (min-device-pixel-ratio: 1.5) {}


/* iphone 4 and higher pixel ratio (2+) devices (retina) */

@media only screen and (-webkit-min-device-pixel-ratio: 2),
only screen and (min-device-pixel-ratio: 2) {}
  1. 引用的reset.css文件
html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
font,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td {
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    font-size: 100%;
    vertical-align: baseline;
    background: transparent;
}

body {
    line-height: 1;
}

ol,
ul {
    list-style: none;
}

blockquote,
q {
    quotes: none;
}

blockquote:before,
blockquote:after,
q:before,
q:after {
    content: '';
    content: none;
}


/* remember to define focus styles! */

:focus {
    outline: 0;
}


/* remember to highlight inserts somehow! */

ins {
    text-decoration: none;
}

del {
    text-decoration: line-through;
}


/* tables still need 'cellspacing="0"' in the markup */

table {
    border-collapse: collapse;
    border-spacing: 0;
}

注意: 在css样式中为根节点设置属性时,padding表现出margin的效果,而margin表现出padding的修改。

目录
相关文章
|
10月前
|
Java 应用服务中间件
TOMCAT 源码分析 -- 构建环境
TOMCAT 源码分析 -- 构建环境
77 0
|
Java 应用服务中间件 Linux
Dockerfile 案例-自定义的 tomcat9 | 学习笔记
快速学习 Dockerfile 案例-自定义的 tomcat9
140 0
Dockerfile 案例-自定义的 tomcat9 | 学习笔记
|
应用服务中间件 开发工具 开发者
DockerFile 案例-自定义的 tomcat9 上发布演示 | 学习笔记
快速学习 DockerFile 案例-自定义的 tomcat9 上发布演示
58 0
DockerFile 案例-自定义的 tomcat9 上发布演示 | 学习笔记
|
Java 应用服务中间件 Linux
DockerFile 案例-自定义的 tomcat9|学习笔记
快速学习 DockerFile 案例-自定义的 tomcat9
99 0
DockerFile 案例-自定义的 tomcat9|学习笔记
|
XML Java 应用服务中间件
DockerFile 案例-自定义的 tomcat9 上发布演示|学习笔记
快速学习 DockerFile 案例-自定义的 tomcat9 上发布演示
62 0
|
应用服务中间件
iead 的Tomcat集成和web项目建立---图片
iead 的Tomcat集成和web项目建立---图片
62 0
iead 的Tomcat集成和web项目建立---图片
|
XML Java 应用服务中间件
Tomcat的安装、配置以及如何部署web项目
今天记录一下在windows系统上安装配置Tomcat的过程以及如何在tomcat上部署web项目。
252 0
Tomcat的安装、配置以及如何部署web项目
|
Web App开发 测试技术 API
使用PHP搭建Web版Docker管理系统实践
版权声明:作者:汤青松 https://blog.csdn.net/u013431141/article/details/81612523 一、背景 团队中使用容器比较频繁,但并不是所有人都可以登陆服务器去执行命令,但是又需要用到docker,所以有一个需求通过web来管理docker,而其他语言并不怎么熟悉,后期维护成本比较高,所以笔者采用PHP来管理容器。
1854 0
|
jenkins Java 应用服务中间件
Jenkins deploy to container部署war到tomcat(学习笔记十六)
/** * lihaibo * 文章内容都是根据自己工作情况实践得出。 *如有错误,请指正 * 版权声明:本博客欢迎转发,但请保留原作者信息! http://www.cnblogs.com/horizonli/p/5407551.html 本博客已经添加"打赏"功能,"打赏"位置位于右边栏红色框中,感谢您的赞助. */ 一、deploy插件 在jenkins中发布application到远端有很多方法,除了publish over ssh外还有个插件deploy.hpi也可以实现。
2525 0