|

楼主 |
发表于 2019-10-22 22:40:04
|
显示全部楼层
ok
html的是:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="author" content="xiaoli">
<meta name="keywords" content="简历">
<meta name="description" content="学历,工作经历,个人基本信息">
<title>xiaoli简历</title>
<link rel="stylesheet" href="style_3.css" type="text/css">
</head>
<body>
<h1>简历</h1>
<h2>基本信息</h2>
<section >
<p ><strong>姓名</strong> 张三</p>
<p><strong>性别</strong> 男</p>
<p><strong>应聘职位</strong> web前端工程师</p>
</section>
<h2>联系方式</h2>
<section>
<p ><strong>手机</strong> 12312341234</p>
<p><strong>Email</strong> <a href="https://www.bilibili.com/" target="_block">joinefe@baidu.com</a></p>
<p><strong>个人主页</strong> <a href="https://www.bilibili.com/"target="_block">Github</a></p>
</section>
<h2>能力描述</h2>
<p><strong>技术能力</strong>熟练掌握HTML,CSS,JavaScript </p>
<p><strong>综合能力</strong>良好沟通, 主动积极, 努力勤奋</p>
<h2>教育背景</h2>
<p><strong>本科</strong>百度前端技术学院小薇学院</p>
<p><strong>研究生</strong>百度前端技术学院大斌学院</p>
<h2>项目经历</h2>
<p><strong>小度小度</strong>作为前端工程师角色参与了ABC组件的开发</p>
<p><strong>SAN Doc</strong>作为文档工程师参与了SAN Doc编写</p>
</body>
</html>
css部分是:body{
margin: 0;
padding: 0;/*消除边缘*/
}
section{
display: flex;
flex-direction: row;/*让基本信息与联系方式内的文本能在同一行向右对齐,是在元素p的父一级设制*/
}
section>p{
margin-left: 0;
margin-right: 100px;/*设置同行元素间隔*/
}
h1{
color: white;
background-color: gray;
padding: 30px;
margin: 0;
}
h2{
background-color: rgb(224, 217, 217);
margin: 0;
padding: 66px 30px;/*一个h2元素为24px大,4个元素就是96px宽,高也要增加72px,对半就是36px*/
display: inline-block;
}
最好能直用css布局,少修改html代码 |
|