第一个h5页面

不废话,先爆照,不好勿喷

我用的软件是WebStorm开发,然后也知道了h5我们可以用谷歌浏览器点击右键,然后点击审查,就可以按照手机屏幕来看到页面

下面是项目的图片

 

这个是我的index.html文件

 

<!doctype html>
<html class="no-js" lang=""><head><meta charset="utf-8"><meta http-equiv="x-ua-compatible" content="ie=edge"><title></title><meta name="description" content=""><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="apple-touch-icon" href="apple-touch-icon.png"><!-- Place favicon.ico in the root directory --><link rel="stylesheet" href="css/normalize.css"><link rel="stylesheet" href="css/main.css"><script src="js/vendor/modernizr-2.8.3.min.js"></script></head><body><!--[if lt IE 8]><p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p><![endif]--><!-- Add your site or application content here --><div class="main"><div class="head"><span class="head_content" >welcome</span></div><div class="center"><div class="one"><div class="in"><img src="../src/img/santa2.png" class="image"></div><div class="value">圣诞老人</div></div><div class="one"><div class="in"><img src="../src/img/snowflake.png" class="image"></div><div class="value">雪花</div></div><div class="one"><div class="in"><img src="../src/img/snowman.png" class="image"></div><div class="value">雪人</div></div><div class="one"><div class="in"><img src="../src/img/stocking.png" class="image"></div><div class="value">袜子</div></div></div><div class="relax"></div><div class="item"><div ><img src="../src/img/horn2.png" class="image1"><span class="val">活动公告:</span><span class="val1">宝马520li现在只需要50万了</span></div></div><div class="relax"></div><div class="item"><div class="tuijian">精品推荐</div><div class="rightimg"><img src="../src/img/right65.png" class="image1" class="image1"></div><div class="gengduo">更多</div></div><div class="relax"></div><div class="item"><div class="tuijian">新品热卖</div><div class="rightimg"><img src="../src/img/right65.png" class="image1" class="image1"></div><div class="gengduo">更多</div></div></div><script src="https://ajax.googleapis.com/ajax/libs/jquery/{{JQUERY_VERSION}}/jquery.min.js"></script><script>window.jQuery || document.write('<script src="js/vendor/jquery-{{JQUERY_VERSION}}.min.js"><\/script>')</script><script src="js/plugins.js"></script><script src="js/main.js"></script><!-- Google Analytics: change UA-XXXXX-X to be your site's ID. --><script>(function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]=function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date;e=o.createElement(i);r=o.getElementsByTagName(i)[0];e.src='https://www.google-analytics.com/analytics.js';r.parentNode.insertBefore(e,r)}(window,document,'script','ga'));ga('create','UA-XXXXX-X','auto');ga('send','pageview');</script></body>
</html>


然后再就是样式了

 

 

/** What follows is the result of much research on cross-browser styling.* Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,* Kroc Camen, and the H5BP dev community and team.*//* ==========================================================================Base styles: opinionated defaults========================================================================== */html {color: #222;font-size: 1em;line-height: 1.4;
}/** Remove text-shadow in selection highlight:* https://twitter.com/miketaylr/status/12228805301** These selection rule sets have to be separate.* Customize the background color to match your design.*/::selection {background: #b3d4fc;text-shadow: none;
}/** A better looking default horizontal rule*/hr {display: block;height: 1px;border: 0;border-top: 1px solid #ccc;margin: 1em 0;padding: 0;
}/** Remove the gap between audio, canvas, iframes,* images, videos and the bottom of their containers:* https://github.com/h5bp/html5-boilerplate/issues/440*/audio,
canvas,
iframe,
img,
svg,
video {vertical-align: middle;
}/** Remove default fieldset styles.*/fieldset {border: 0;margin: 0;padding: 0;
}/** Allow only vertical resizing of textareas.*/textarea {resize: vertical;
}/* ==========================================================================Browser Upgrade Prompt========================================================================== */.browserupgrade {margin: 0.2em 0;background: #ccc;color: #000;padding: 0.2em 0;
}
/* ==========================================================================Author's custom styles========================================================================== *//* ==========================================================================Helper classes========================================================================== *//** Hide visually and from screen readers:*/.hidden {display: none !important;
}/** Hide only visually, but have it available for screen readers:* http://snook.ca/archives/html_and_css/hiding-content-for-accessibility*/.visuallyhidden {border: 0;clip: rect(0 0 0 0);height: 1px;margin: -1px;overflow: hidden;padding: 0;position: absolute;width: 1px;
}/** Extends the .visuallyhidden class to allow the element* to be focusable when navigated to via the keyboard:* https://www.drupal.org/node/897638*/.visuallyhidden.focusable:active,
.visuallyhidden.focusable:focus {clip: auto;height: auto;margin: 0;overflow: visible;position: static;width: auto;
}
.main{/*margin-left: 150px;*//*margin-right: 150px;*/height: auto;/*border: 2px solid #212121;*//*border-radius: 20px;*/background-color: red;
}
.head{height: 150px;background-color:#ffff00;text-align: center;font-style: oblique;font-size: 40px;line-height:140px;
}
.center{height: 80px;background-color:bisque;position:relative
}
.one{width: 25%;height: 80px;background-color:greenyellow;float:left
}
.two{width: 25%;height: 80px;background-color:rosybrown;float:left
}
.three{width: 25%;height: 80px;background-color:brown;float:left
}
.four{width: 25%;height: 80px;background-color:aquamarine;float:left
}
.relax{height: 10px;background-color: #cccccc;
}
.item{height: 40px;background-color: white;
}
.head_content{/*background-color:darkgray;*//*margin-top: 100px;*//*text-align: center;*//*line-height:80px;*/
}
.image{width: 50px;height: 50px;margin: auto;margin-top: 5px;
}
.in{text-align: center;
}
.value{text-align: center;
}
.left{margin-top: 10px;
}
.tuijian{margin-top: 8px;float: left;
}
.gengduo{float: right;margin-top: 8px;}
.rightimg{float: right;}
.val1{margin-left: 15px;
}
/** Hide visually and from screen readers, but maintain layout*/.invisible {visibility: hidden;
}
.image1{/*margin-top: 4px;*/width: 25px;height: 25px;
}
.val{line-height : 40px;margin-top: 10px;margin-left: 5px;
}/** Clearfix: contain floats** For modern browsers* 1. The space content is one way to avoid an Opera bug when the*    `contenteditable` attribute is included anywhere else in the document.*    Otherwise it causes space to appear at the top and bottom of elements*    that receive the `clearfix` class.* 2. The use of `table` rather than `block` is only necessary if using*    `:before` to contain the top-margins of child elements.*/.clearfix:before,
.clearfix:after {content: " "; /* 1 */display: table; /* 2 */
}.clearfix:after {clear: both;
}/* ==========================================================================EXAMPLE Media Queries for Responsive Design.These examples override the primary ('mobile first') styles.Modify as content requires.========================================================================== */@media only screen and (min-width: 35em) {/* Style adjustments for viewports that meet the condition */
}@media print,(min-resolution: 1.25dppx),(min-resolution: 120dpi) {/* Style adjustments for high resolution devices */
}/* ==========================================================================Print styles.Inlined to avoid the additional HTTP request:http://www.phpied.com/delay-loading-your-print-css/========================================================================== */@media print {*,*:before,*:after {background: transparent !important;color: #000 !important; /* Black prints faster:http://www.sanbeiji.com/archives/953 */box-shadow: none !important;text-shadow: none !important;}a,a:visited {text-decoration: underline;}a[href]:after {content: " (" attr(href) ")";}abbr[title]:after {content: " (" attr(title) ")";}/** Don't show links that are fragment identifiers,* or use the `javascript:` pseudo protocol*/a[href^="#"]:after,a[href^="javascript:"]:after {content: "";}pre,blockquote {border: 1px solid #999;page-break-inside: avoid;}/** Printing Tables:* http://css-discuss.incutio.com/wiki/Printing_Tables*/thead {display: table-header-group;}tr,img {page-break-inside: avoid;}img {max-width: 100% !important;}p,h2,h3 {orphans: 3;widows: 3;}h2,h3 {page-break-after: avoid;}
}


总结:字房子中间样式

 

 

    text-align: center;

行高要记住

 

 

    line-height : 40px;

 

 

 

 

 

 

 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/294456.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

HDU-2023

求平均成绩 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 54671 Accepted Submission(s): 13094 Problem Description假设一个班有n(n<50)个学生&#xff0c;每人考m(m<5)门课&#xff0c;求每个学生的…

Ubuntu系统备份和恢复

为什么80%的码农都做不了架构师&#xff1f;>>> 安装好Ubuntu之后&#xff0c;别忘了安装 for linux 防火墙和杀毒软件。在备份系统前&#xff0c;请保证系统是无错和干净的&#xff1a;本人操作系统是ubuntu14.04&#xff0c;不知道是系统出了问题还是装的软件有问…

回顾2012;展望2013

同样的话题&#xff0c;但是却在不同的时间&#xff0c;不同的地点&#xff0c;感触却也良多。回顾2012&#xff1b;展望2013虽说是老话题。但对于我来说是一年向下一年的一个跨度。今天是2012年12月19日凌晨05&#xff1b;16分转载于:https://blog.51cto.com/tengfeidongman/1…

热血致敬!曾影响几代科学巨匠的传奇经典,至今仍无人能超越!

▲ 点击查看有人说&#xff0c;世界上有两本神书&#xff0c;一本是霍金的《时间简史》&#xff0c;是可以不看&#xff0c;但书架必须得有。还有一本&#xff0c;就是必须有也必须看的书&#xff0c;这就是《从一到无穷大》。2018年&#xff0c;清华大学校长&#xff0c;将这本…

链表之单链表约瑟夫问题(一)

package com.chenyu.zuo.linkedList;import com.chenyu.zuo.linkedList.RemoveMidNode.Node; /*** 环形单链表的约瑟夫问题* 比如5个人,报数第3个就删除,从第一个人开始报数* 1、2、3、4、5* 1、2、4、5* 2、4、5* 2、4* 4* 最后4留下来了* 输入:一个单向环形链表的头节点h…

.NET 6 中 gRPC 的新功能

gRPC是一个现代的、跨平台的、高性能的 RPC 框架。gRPC for .NET 构建在 ASP.NET Core 之上&#xff0c;是我们推荐的在 .NET 中构建 RPC 服务的方法。.NET 6 进一步提高了 gRPC 已经非常出色的性能&#xff0c;并添加了一系列新功能&#xff0c;使 gRPC 在现代云原生应用程序中…

视频编码H.264的应用

近日&#xff0c;数字音视频编解码技术标准&#xff08;AVS&#xff09;工作组在12月21日结束的第47次会议上公布并于明年4月份会正式推出最新的AVS2视频编码标准&#xff0c;新的编码效率比上一代标准翻了一番&#xff0c;并且在无失真音频编码上取得了突破性的进展。AVS编码标…

java捕捉音频,如何捕获在Java中的音频数据

I want to access the audio data that my microphone is recording with Java. How would I do that?My goal is to save the audio data that is recorded and simultaneously play it to the user.解决方案If you dont need any of the additional functionality in JMF, I…

saltstack的安装(转载连接)

see the link转载于:https://blog.51cto.com/358778493/1767256

java-developer 性能是怎么样的?

在项目中&#xff0c;我们都经常面临所开发的产品性能问题。然而这些问题都不是很容易解决。大多性能问题追根究底都是系统架构或者说是设计问题。推翻了重做是不可能的&#xff0c;怎么从这些问题中吸取经验教训才是正道。来看看我遇到的设计问题。 案例&#xff1a; 企业…

链表之单链表约瑟夫问题(二)

约瑟夫环(约瑟夫问题)是一个数学的应用问题:已知n个人(以编号1,2,3...n分别表示)围坐在一张圆桌周围。从编号为k的人开始报数,数到m的那个人出列;他的下一个人又从1开始报数,数到m的那个人又出列;依此规律重复下去,直到圆桌周围的人全部出列。通常解决这类问题时我…

这,像极了爱情!

全世界只有3.14 % 的人关注了爆炸吧知识特别的爱给特别的你古希腊数学家普罗克洛斯说过&#xff1a;“数学就是这样一种东西&#xff1a;她提醒你有无形的灵魂&#xff0c;她赋予她所发现的真理以生命&#xff1b;她唤起心神&#xff0c;澄净智慧&#xff1b;她给我们的内心思想…

使用C#为MSTest测试项目实现自定义断言

前言MSTest测试项目为我们实现了断言类Assert&#xff0c;用于报告代码行为的正确性&#xff0c;比如&#xff1a;var result Calculator.Add(1,2); Assert.AreEqual(3, result);虽然常用的断言方法已经可以工作。但是&#xff0c;我们更希望使用自定义断言&#xff0c;这样可…

mysql 调用未定义函数_php – Wierd和Annoying错误:调用未定义的函数mysql_query()[复制]...

参见英文答案 > Why shouldn’t I use mysql_* functions in PHP? 15个我已经在这一个超过一个小时了,我可以连接到我的数据库和所有(不会给出任何错误)但是当我尝试使用时我收到以下错误“的mysql_query($查询);”Call to undefined f…

window.onscroll

http://www.w3help.org/zh-cn/causes/SD9013 1.各浏览器对 document、document.body、document.documentElement 对象的 onscroll 事件支持情况 依次为 window、HTMLDivElement、document、document.body、document.documentElement 对象绑定 scroll 事件监听器&#xff0c;在触…

ZABBIX2.4.8监控 Windows Mysql数据库

2019独角兽企业重金招聘Python工程师标准>>> 系统环境&#xff1a; 操作系统&#xff1a;Windows Server 2012 ZABBIX Server&#xff1a;2.4.8 IP地址&#xff1a;192.168.0.77 模板脚本地址&#xff1a;http://pan.baidu.com/s/1eSDaiS6 ZABBIX客户端操作 1、在za…

B2B电子商务网站杂谈

B2B电子商务网站作为网络营销的交易平台, 一方面要保证功能完善, 买卖双方可以快捷、方便地进行交易。另一方面网站的宣传是挖掘潜在客户的 重要手段, 只有2 个方面都足够强大, 才能使相应B2B 电子商务网站在激烈的竞争中处于不败之地。 那么在企业网站缺乏足够资金进行宣传推广…

美国知名华人学者陈刚被捕,他出身贫寒,是一个不折不扣的工作狂

全世界只有3.14 % 的人关注了爆炸吧知识陈刚教授&#xff08;图片来源&#xff1a;MIT网站&#xff09;本文转自赛先生当地时间1月14日&#xff0c;美国司法部官网消息显示&#xff0c;美国工程院院士、麻省理工学院&#xff08;MIT&#xff09;教授陈刚因未能向美国能源部披露…

使用 CliWrap 让C#中的命令行交互举重若轻

在代码中进行命令行交互是一个很常见的场景, 特别是在一些CI CD 自动化流程中, 在这之前我们会使用 System.Diagnostics.Process API, 现在有一个更灵活的工具 CliWarp, 这是一个在 .NET 平台使用的命令行交互工具库, 通过在C# 中使用 Fluent 的API, 让命令行交互举重若轻。htt…

Java设置edittext光标,如何改变的EditText光标高度?

I want to change the EditText cursor height, does anyone know how?解决方案I had to dig far into the Android source to find the answer to this, but you essentially have to use padding on a custom shape drawable.note: only works on API 12 and greater due to…