html/css 个人网站实例(一)

article/2025/11/11 13:28:37

显示效果

在这里插入图片描述

HTML代码

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>alalasheep的个人网站</title><link rel="stylesheet" href="../css/index.css">
</head>
<body><header><div class="logo"><span>Logo</span></div><ul id="nav"><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 style="border:#fff" href="#">留言</a></li></ul></header><div id="container"><div id="banner"><img src="../images/banner.jpg" alt="首页轮播图"></div>  <div id="column"><span class="span1">公告:我的个人网站开通了,欢迎光临!</span><span class="span2">公众号:小鹿动画学编程</span></div><div id="middle"><div id="content"><div class="left"><img src="../images/more.jpg" alt=""><p><span class="span3">站长介绍</span><span class="span4">Introduce</span></p><div><img src="../images/pic1.jpg" alt=""><p>林沁园,2015年毕业于香港浸会大学,主修显视表演专业(Acting for Film andTelevision)。出生于中国福建,管参演过电影《男人不可以》《恶人之百鬼夜行》。</p></div></div><div class="right"><img src="../images/more.jpg" alt=""><p><span class="span5">站长相册</span><span class="span6">Photo</span></p><div><img src="../images/p2.jpg" alt=""><img src="../images/p3.jpg" alt=""><img src="../images/p4.jpg" alt=""></div></div></div></div></div><footer><span>Copyinght&copy;2018,版权所有www.125jz.com</span></footer>
</body>
</html>

CSS代码

body{margin: 0;padding: 0;font-size: 12px;line-height: 200%;
}
header{display: inline-block;width: 100%;height: 73px;
}
.logo{float: left;/* background-color: red; */width: 50%;height: 100%;
}
.logo span{display: block;width: 80px;height: 100%;margin: 0 auto;/* background-color:green; */line-height: 70px;text-align: center;font-size: 2em;font-weight: 600;
}
ul{display: flex;float: right;width: 50%;height: 100%;margin: 0;  /*去除间隙 */padding: 0;/* background-color: red; */ 
}
li{list-style-type: none;margin: 0;padding: 0;width: 82px;height: 100%;/* background-color: rgb(112, 104, 104); */
}
/* li:nth-child(odd)
{background-color: red;
} */
a{display: block;margin-top: 37%;border-right: 1px #39c dashed;color: #39c;font-size: 16px;font-weight: 500;text-decoration: none;line-height: 18px;text-align: center;/* background-color:#096; */  
}
a:hover{color: #ff0000;
}
#container{width: 100%;
}
#banner img{width: 100%;/* height: 463px; */height:370px;
}
#column{width: 100%;height: 47px;background-image: url(../images/hbg.png);
}
#column span{display: inline-block;height: 100%;font-weight: 500;line-height: 47px;text-align: center;
}
#column .span1{margin-left:245px;
}
#column .span2{margin-left: 450px;color: #ff0000;
}
#middle{position: relative;width: 100%;height: 240px;background-color:rgb(246,246,246);
}
#content{position: absolute;width: 936px;height: 90%;margin:0 auto;margin-top: 1%;margin-left: 17%;background-color: #fff;
}
.left{float: left;width: 50%;height: 100%;
}
.left img,.right img{float: right;margin-right: 20px; margin-top: 20px;
}
.left p,.right p{margin-left: 20px; margin-top: 20px;font-size: 16px;font-weight: 500;
}
.left p .span4,.right p .span6{display: inline-block;width: 80px;height: 100%;border-left:1px #39c dashed;color: #900;text-align: center;
}
.right p .span6{width: 50px;
}
.left div img{float: left;margin: 0;padding: 0;margin-left: 20px;
}
.left div p{display: inline-block;margin: 0;padding: 12px 12px;width: 200px;height: 100%;font-size: 12px;text-align: justify;
}
.right{float: right;width: 50%;height: 100%;
}
.right div{width: 465px;height: auto;margin-top:30px;
}
.right div img{display: flex;float: left;margin: 0;padding: 0;margin-right: 4px;
}  
footer{position: relative;height: 40px;background-color: #e8e8e8;font-weight: 100%;
}
footer span{display: block;position: absolute;width: 100%;margin: 0 auto;margin-top: 20px;line-height: 13px;text-align: center;
}

前端入土系列 | 实战项目之个人站点制作

链接:https://pan.baidu.com/s/15NcmsVkXBWWSOhsKzHqv4Q
提取码:z4ou
素材来源:公众号 - 小鹿动画学编程


http://chatgpt.dhexx.cn/article/J7ICInDe.shtml

相关文章

CSS实例 简单案例

CSS文件 注意改变图片的样式时&#xff0c;是要加给图片所在的标签 比如p /* 整体 */ body {font: 16px/28px "Microsoft YaHei"; }/* 大标题 */ h1 {font-weight: 600;text-align: center; }/* 连接a */ a {text-decoration: none; }/* 时间 来源 */ .scor {font-…

CSS案例(1)

写在前面&#xff1a;本篇所有 css 均使用内嵌式引入。若想使用外链式&#xff0c;需先新建 .css 文件&#xff0c;再通过 link 标签引入到 html 里&#xff0c;样式部分的代码基本不用做其他修改。 目录 1 导航栏样式 2 商品展示页面 3 简单新闻页面 4 布局样式 1 导航栏样…

小案例CSS

代码&#xff1a; <!DOCTYPE html> <html lang"en"> <head> <meta charset"UTF-8"> <meta http-equiv"X-UA-Compatible" content"IEedge"> <meta name"viewport" content"widthde…

CSS常见样式的介绍和使用(附加案例)

CSS样式 一、css介绍 层叠样式表(英文全称&#xff1a;Cascading Style Sheets) ​ 是一种用来表现HTML标准通用标记语言的一个应用&#xff09;或XML&#xff08;标准通用标记语言的一个子集&#xff09;等文件样式的计算机语言。CSS不仅可以静态地修饰网页&#xff0c;还可以…

CSS 示例

基础内容 引入样式表&#xff1a;<link rel"stylesheet" href"test.css"> em&#xff1a;相对大小单位 选择器 示例说明#id选择所有类.clsss选择所有类p选择所有p标签&#xff0c;可以加逗号分组p em后代选择器&#xff0c;选中p标签中所有em标签…

CSS-200个小案例(一)

最近我在youtube上跟着大神学习200个CSS小案例&#xff0c;作者Online Tutorials 编码的内容很实用&#xff0c;案例中涉及定位、变换、动画等概念&#xff0c;适合进一步学习和巩固CSS知识&#xff0c;能帮助我们实现页面的特效。 youtube视频链接&#xff1a;https://www.you…

30个超棒的CSS应用实例

这 篇文章是很早之前在博客园看到的&#xff0c;收藏在网摘里&#xff0c;今天再看发现实在很棒&#xff0c;转载过来方便以后参考用&#xff0c;最棒的地方是这些效果的实现都只是利用CSSHTML 来实现的&#xff0c;基本上没有用到什么FLASH或JS脚本&#xff0c;大家也可以看看…

【CSS实例】

学习目标&#xff1a; css样式学习、总结&#xff0c;知识巩固 学习内容&#xff1a; 在这里我将会发布一些自己学习过程中完成的css实例&#xff0c;可能是跟着网上学习的练习作品&#xff0c;也可能是自己的随意的一个想法。每个作品中会列出编写思路&#xff0c;和编写过程…

codewar代码练习1——8级晋升7级

最近发现一个不错的代码练习网站codewar&#xff08;http://www.codewars.com&#xff09;。注册了一个账号&#xff0c;花了几天的茶余饭后时间做题&#xff0c;把等级从8级升到了7级。本文的目的主要介绍使用感受及相应题目&#xff0c;可供大家参考。 新人注册为8级&#xf…

codewar python 遗忘点

2019独角兽企业重金招聘Python工程师标准>>> 1、计算字符串中特定字符串出现的次数 s this is a new technology,and I want to learn this. print(s.count(this, 0, len(s))) #目标字符串区分大小写 2、数字左边补0的方法,字符串补空格 #python中有一个zfil…

Codewar - Bit Counting

2019独角兽企业重金招聘Python工程师标准>>> Write a function that takes an (unsigned) integer as input, and returns the number of bits that are equal to one in the binary representation of that number. Example: The binary representation of 1234 is…

codewar 代码练习1——8级晋升7级

最近发现一个不错的代码练习网站codewar&#xff08;http://www.codewars.com&#xff09;。注册了一个账号&#xff0c;花了几天的茶余饭后时间做题&#xff0c;把等级从8级升到了7级。本文的目的主要介绍使用感受及相应题目&#xff0c;可供大家参考。 新人注册为8级&#xf…

codewar 代码练习2——7级晋升6级

7级晋升到6级的过程中以做6级题以及以前未完成的题目为主&#xff0c;一般选择算法题或者基础题。相比之前从8级升级7级&#xff08;参见此博客&#xff1a;http://blog.csdn.net/m0_37324740/article/details/78408249&#xff09;的难度有所提前&#xff0c;并且一些题目结合…

R数据分析,codewar的年终总结,和一周年总结

前阵子单位各个部门都在要求弄总结&#xff0c;想想自己这个公众号也写了快一年了&#xff0c;专门回去翻了翻&#xff0c;这个公众号发布的第一篇文章是在2021年的1月17日&#xff0c;我想2022年的1月17日我就把现在敲的文字推出来吧&#xff0c;也算是一个年终和周年总结。 …

CodeWar题目

打算把不同网站上面的题目分开整理&#xff0c;免得麻烦。Code War上面我还是刷了一堆6级及以下的题目的&#xff0c;不过价值不大&#xff0c;这种不太能够训练实际解决问题的能力&#xff0c;所以我已经很久没上过了&#xff0c;有时间了可能会重新上去刷题吧&#xff0c;到时…

Codewar 笔记

1. Weight for weight 题目&#xff1a; For example 99 will have “weight” 18, 100 will have “weight” 1 so in the list 100 will come before 99. Given a string with the weights of FFC members in normal order can you give this string ordered by “weights”…

codewar刷题,苦海造舟之始

今天又是被惨虐的一天&#xff0c;尽管今天是我这篇处女座发布的日子。   事情是这样的&#xff0c;身为一个刚迈步进入编程领域的小白&#xff0c;在无忧无虑&#xff0c;轻松惬意的心情下刷完了一套python课后&#xff0c;偶然间&#xff0c;很突然地了解到codewars这么个玩…

Codewar一些积累No.2 从矩阵的加法体会vector的用法

用代码实现矩阵加法问题 最近在Codewar上看到一个有趣的问题是关于矩阵的加法问题. 题目中, 我所要编写的函数的传入参数是两个向量, 而且此向量是嵌套的, 具体内容如下: std::vector<std::vector<int> > matrixAddition(std::vector<std::vector<int> …

Java到底好不好学

Java到底好不好学 答案是&#xff1a;不难学。很多人都以为编程是个很高深的东西&#xff0c;其实不然&#xff0c;真正学习了你会发现编程比你高中学的数理化要简单的多。说它不难呢&#xff0c;如果学深入了&#xff0c;还算有很多东西要学习&#xff0c;比如你学Java&#…

java面试为何那么难

java面试为何那么难 “面试造火箭、工作拧螺丝”&#xff0c;曾经这么一句调侃的话总是用来形容IT行业中的面试情况。作为一个流浪的程序猿&#xff0c;多年以来作为应聘者也好、面试官也罢&#xff0c;渐渐感受到java开发的面试不再仅仅在“造火箭”那么容易。 我的就职历程…