This article mainly introduces a simple blog webpage written through html and css imitation. Interested friends can refer to it.
The code is as follows:
<!DOCTYPE html> <html> <head> <meta charset = "utf-8"> <title>myBlog</title> <style> body{ margin:0; padding:0; } #container{ width:1349px; height:1500px; background-color:#eee; } #header{ background-color:white; height:50px; width:1349px; } #header .title li{ height:50px; line-height:50px; font-size:15px; margin-left:20px; margin-right:10px; list-style-type:none; float:left; } .title li a:link{ color:black; text-decoration:none; } .title li a:hover{ color:red; } #header .subtitle li { line-height:50px; float:left; list-style-type:none; font-size:15px; margin-right:10px; color:black; } .subtitle li a:link{ color:black; text-decoration:none; } .subtitle li a:hover{ color:red; } #main{ width:1349px; height:1500px; background-image:url(./images/bkg.jpg); } #main h{ margin:50px 900px 50px 80px; font-size:40px; font-weight:700px; float:left; } #main .mana li { float:left; margin-right:20px; margin-top:40px; list-style-type:none; font-size:15px; color:white; } .mana li a{ border:1px solid white; padding:2px; color:white; text-decoration:none; } .mana a:hover{ background:red; color:white; } #lside{ width:800px; height:700px; background:white; margin:0px 50px 50px 80px; padding:5px; float:left; } #rside{ width:300px; height:1000px; background:white; float:left; } #state h{ margin:20px 400px 20px 15px; color:#999; font-size:18px; border:1px solid gray; padding:2px; font-family:'PingFang SC','Microsoft YaHei',SimHei,Arial,SimSun; } #state img{ margin:20px 20px 10px 15px; } #artitlrtitle h{ font-size:20px; font-weight:700px; margin:10px 200px 10px 15px; float:left; clear:both; } #content p{ font-size:10px; margin:5px 15px; clear:both; color:#999; } #time h{ margin:3px 10px 5px 15px; font-size:15px; float:left; color:#999; } #time .oth{ margin:3px 10px 5px 15px; font-size:15px; float:left; color:#999; } #head img{ margin:15px; } #head p{ float:left; font-size:20px; margin:30px 10px; font-weight:700px; color:#999; font-weight:600px; } #four .yuan{ font-size:16px; font-weight:700px; margin:5px 10px 10px 40px; color:gray; float:left; } #four .num1{ font-size:14px; font-weight:700px; margin:5px 6px 20px 51px; color:#999; } #four .num2{ font-size:14px; font-weight:700px; margin:5px 7px 20px 50px; color:#999; } #four .num3{ font-size:14px; font-weight:700px; margin:5px 7px 20px 46px; color:#999; } #four .num4{ font-size:14px; font-weight:700px; margin:5px 7px 20px 29px; color:#999; } #intro{ height:260px; width:300px; margin-top:10px; } #intro .ff{ font-size:10px; margin:5px 20px; clear:both; } #fenlei h{ font-size:15px; font-weight:700px; float:left; margin:10px 20px; font-weight:700px; } #fenlei p .ti1 { float:left; clear:left; font-size:10px; margin:5px 20px; color:gray; text-decoration:none; } #fenlei p .ti1:hover{ color:red; } #fenlei .tii1{ float:right; clear:right; font-size:8px; margin:5px 20px; color:#bbb; } #cundang h{ font-size:15px; font-weight:700px; float:left; clear:left; margin:20px 20px; } #cundang p .ti1{ float:left; clear:left; font-size:10px; margin:5px 20px; color:gray; text-decoration:none; } #cundang p .ti1:hover{ color:red; } #cundang .tii1{ float:right; clear:right; font-size:8px; margin:5px 20px; color:#bbb; } #paiming h{ font-size:15px; font-weight:700px; float:left; clear:left; margin:20px 20px; font-weight:700px; } #pm .tiname{ float:left; clear:left; font-size:15px; margin:5px 20px; color:gray; text-decoration:none; } #pm .tiname:hover{ color:red; } #pm .tinum{ float:left; clear:left; font-size:8px; margin:3px 20px; color:#bbb; } #callus h{ font-size:15px; font-weight:700px; float:left; clear:left; margin:20px 20px; font-weight:700px; } #callus .us{ font-size:10px; margin:5px 2px 5px 20px; float:left; clear:left; } #callus .weibo{ font-size:10px; margin:5px 5px; padding-right:80px; float:right; clear:right; } #callus .us1{ font-size:10px; margin:5px 20px; float:left; clear:left; } #callus .oo1{ margin:40px 80px 10px 80px; font-size:10px; float:left; clear:left; } #callus .oo2{ margin:10px 80px 10px 80px; font-size:10px; float:left; clear:left; } </style> <!-- <link rel = "stylesheet" type = "text/css" href = "blog.css"> --> </head> <body> <div id = "container"> <div id = "header"> <div id = "firstpic" > <img a href = "" src = "./images/csdn.jpg" alt = "" width="80" style="max-width:90%" style="float:left"></a> </div> <div id = "menu"> <ul class = "title" > <li><a href = "#" >博客</a></li> <li><a href = "#" >学院</a></li> <li><a href = "#" >下载</a></li> <li><a href = "#" >GitChat</a></li> <li><a href = "#" >论坛</a></li> <li><a href = "#" >问答</a></li> <li><a href = "#" >商城</a></li> <li><a href = "#" >头条</a></li> <li><a href = "#" >活动</a></li> <li><a href = "#" >码云</a></li> <li><a href = "#" style = "margin-right:150px">ITeye</a></li> </ul> </div> <div id = "secondpic" > <img id = "search" src = "./images/search.jpg" alt = "" style="max-width:90%" width = "200" style="float:left" > </div> <div id = "other"> <ul class = "subtitle" > <li><a href = "#" style="margin-left:23px">写博客</a></li> <li><a href = "#" style="margin-left:23px">发Chat</a></li> </ul> </div> <div id = "thirdpic"> <img a href = "" src = "./images/c.gif" alt = "" width = "50" height = "50" style="max-width:90%"></a> </div> </div> <div id = "main"> <h>我的博客</h> <ul class = "mana"> <li><a href = " " >修改个人资料</a></li> <li><a href = " " >管理博客</a></li> </ul> <div id = "lside"> <div id = "state"> <h>只看原创</h> <div id = "fourthpic"> <img src = "./images/search.jpg" alt = "" > </div> </div> <div id = "artitlrtitle"> <h > listview实现列表</h> </div> <div id = "content"> <p>listview实现一个列表。listview实现一个列表。listview实现一个列表。listview实现一个列表。listview实现一个列表。listview实现一个列表。listview实现一个列表。listview实现一个列表. listview实现一个列表.listview实现一个列表.</p> </div> <div id = "time"> <h>原创</h> <p class = "oth">2018-01-01 00:00:00</p> <p class = "oth">阅读量:1000</p> <p class = "oth">评论:2</p> </div> <div id = "artitlrtitle"> <h>listview实现列表</h> </div> <div id = "content"> <p>listview实现一个列表。listview实现一个列表。listview实现一个列表。listview实现一个列表。listview实现一个列表。listview实现一个列表。listview实现一个列表。listview实现一个列表. listview实现一个列表.listview实现一个列表.</p> </div> <div id = "time"> <h>原创</h> <p class = "oth">2018-01-01 00:00:00</p> <p class = "oth">阅读量:1000</p> <p class = "oth">评论:2</p> </div> <div id = "artitlrtitle"> <h>listview实现列表</h> </div> <div id = "content"> <p>listview实现一个列表。listview实现一个列表。listview实现一个列表。listview实现一个列表。listview实现一个列表。listview实现一个列表。listview实现一个列表。listview实现一个列表. listview实现一个列表.listview实现一个列表.</p> </div> <div id = "time"> <h>原创</h> <p class = "oth">2018-01-01 00:00:00</p> <p class = "oth">阅读量:1000</p> <p class = "oth">评论:2</p> </div> <div id = "artitlrtitle"> <h>listview实现列表</h> </div> <div id = "content"> <p>listview实现一个列表。listview实现一个列表。listview实现一个列表。listview实现一个列表。listview实现一个列表。listview实现一个列表。listview实现一个列表。listview实现一个列表. listview实现一个列表.listview实现一个列表.</p> </div> <div id = "time"> <h>原创</h> <p class = "oth">2018-01-01 00:00:00</p> <p class = "oth">阅读量:1000</p> <p class = "oth">评论:2</p> </div> <div id = "artitlrtitle"> <h>listview实现列表</h> </div> <div id = "content"> <p>listview实现一个列表。listview实现一个列表。listview实现一个列表。listview实现一个列表。listview实现一个列表。listview实现一个列表。listview实现一个列表。listview实现一个列表. listview实现一个列表.listview实现一个列表.</p> </div> <div id = "time"> <h>原创</h> <p class = "oth">2018-01-01 00:00:00</p> <p class = "oth">阅读量:1000</p> <p class = "oth">评论:2</p> </div> </div> <div id = "rside"> <div id = "head"> <img a href = "" src = "./images/c.gif" alt = "" width = "50" height = "50" style="max-width:90%"></a> <p>XXX</p> <div id = "four"> <p class = "yuan" style="word-spacing:22px;text-indent:6px;">原创 粉丝 喜欢 码云 </p> <p class = "num1" > 8 </p> <p class = "num2" > 8 </p> <p class = "num3" > 8 </p> <p class = "num4"> 未开通 </p> </div> </div> <div id = "intro"> <p class = "ff" >访问量: 1000 </p> <p class = "ff" >等级: 2 </p> <p class = "ff" >排名: 10000 </p> <p class = "ff" >勋章: 恒 </p> </div> <div id = "fenlei"> <h>文章分类 </h> <p><a class = "ti1" href = "#" > Android</a></p> <p class = "tii1">8篇</p> <p><a class = "ti1" href = "#" > CSS </a></p> <p class = "tii1">8篇</p> <p><a class = "ti1" href = "#" > JAVA </a></p> <p class = "tii1">8篇</p> </div> <div id = "cundang"> <h>文章存档 </h> <p><a class = "ti1" href = "#" > 2017年10月</a></p> <p class = "tii1">2篇</p> <p><a class = "ti1" href = "#" > 2018年01月 </a></p> <p class = "tii1">2篇</p> <p><a class = "ti1" href = "#" > 2019年03月 </a></p> <p class = "tii1">6篇</p> </div> <div id = "paiming"> <h>阅读排名</h> <div id = "pm"> <p><a class = "tiname" href = "#">css链接</a></p> <p class = "tinum">阅读量:200</p> </div> <div id = "pm"> <p><a class = "tiname" href = "#">css链接</a></p> <p class = "tinum">阅读量:200</p> </div> <div id = "pm"> <p><a class = "tiname" href = "#">css链接</a></p> <p class = "tinum">阅读量:200</p> </div> </div> <div id = "callus"> <h>联系我们</h> <p class = "us">网站客服</p> <p class = "weibo"> 微博客服</p> <p class = "us1"> www.php.cn</p> <p class = "us1">400-100-200</p> <p class = "oo1">京ICP证00000000号</p> <p class = "oo2">关于|招聘|广告服务</p> </div> </div> </div> </div> </body> </html>
Related recommendations:
How do novices pass Vue .js Node.js to build a personal blog
WordPress to build a personal blog
node.js blog project development experience sharing
html and csss realize simple blog code sharing
The above is the detailed content of Practical imitation blog page. For more information, please follow other related articles on the PHP Chinese website!

The future trends of HTML are semantics and web components, the future trends of CSS are CSS-in-JS and CSSHoudini, and the future trends of JavaScript are WebAssembly and Serverless. 1. HTML semantics improve accessibility and SEO effects, and Web components improve development efficiency, but attention should be paid to browser compatibility. 2. CSS-in-JS enhances style management flexibility but may increase file size. CSSHoudini allows direct operation of CSS rendering. 3.WebAssembly optimizes browser application performance but has a steep learning curve, and Serverless simplifies development but requires optimization of cold start problems.

The roles of HTML, CSS and JavaScript in web development are: 1. HTML defines the web page structure, 2. CSS controls the web page style, and 3. JavaScript adds dynamic behavior. Together, they build the framework, aesthetics and interactivity of modern websites.

The future of HTML is full of infinite possibilities. 1) New features and standards will include more semantic tags and the popularity of WebComponents. 2) The web design trend will continue to develop towards responsive and accessible design. 3) Performance optimization will improve the user experience through responsive image loading and lazy loading technologies.

The roles of HTML, CSS and JavaScript in web development are: HTML is responsible for content structure, CSS is responsible for style, and JavaScript is responsible for dynamic behavior. 1. HTML defines the web page structure and content through tags to ensure semantics. 2. CSS controls the web page style through selectors and attributes to make it beautiful and easy to read. 3. JavaScript controls web page behavior through scripts to achieve dynamic and interactive functions.

HTMLisnotaprogramminglanguage;itisamarkuplanguage.1)HTMLstructuresandformatswebcontentusingtags.2)ItworkswithCSSforstylingandJavaScriptforinteractivity,enhancingwebdevelopment.

HTML is the cornerstone of building web page structure. 1. HTML defines the content structure and semantics, and uses, etc. tags. 2. Provide semantic markers, such as, etc., to improve SEO effect. 3. To realize user interaction through tags, pay attention to form verification. 4. Use advanced elements such as, combined with JavaScript to achieve dynamic effects. 5. Common errors include unclosed labels and unquoted attribute values, and verification tools are required. 6. Optimization strategies include reducing HTTP requests, compressing HTML, using semantic tags, etc.

HTML is a language used to build web pages, defining web page structure and content through tags and attributes. 1) HTML organizes document structure through tags, such as,. 2) The browser parses HTML to build the DOM and renders the web page. 3) New features of HTML5, such as, enhance multimedia functions. 4) Common errors include unclosed labels and unquoted attribute values. 5) Optimization suggestions include using semantic tags and reducing file size.

WebdevelopmentreliesonHTML,CSS,andJavaScript:1)HTMLstructurescontent,2)CSSstylesit,and3)JavaScriptaddsinteractivity,formingthebasisofmodernwebexperiences.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Atom editor mac version download
The most popular open source editor

SublimeText3 Linux new version
SublimeText3 Linux latest version

SublimeText3 Mac version
God-level code editing software (SublimeText3)

SublimeText3 English version
Recommended: Win version, supports code prompts!

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.