4-3编程练习

来源:4-3 编程练习

shalomg

2017-12-07 22:42:04

<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8">

<title>CSS定位练习</title>

<style>

* {

margin: 0;

padding: 0;

}

.con {

width: 100%;

height: 4000px;

background: url(http://climg.mukewang.com/59c9f7ce0001839219034033.png) center no-repeat;

}

.lef {

width: 200px;

height: 240px;

position: fixed;

left: 0;

top: 50%;

margin-top: -120px;

background: linear-gradient(to bottom,rgba(255,42,78,1),rgba(254,163,178,.6));

color: #fff;

font-family: '微软雅黑';

padding: 10px;

}

.tit{

font-size: 26px;

font-weight: bold;

padding: 10px 0;

}

.text {

margin-top: 20px;

}

.text a {

color: #fff;

text-decoration: none;

}

.border {

width: 180px;

height: 1px;

background-image: linear-gradient(to left,rgba(255,255,255,0),rgba(255,255,255,1));

}

.rig {

width: 200px;

height: 240px;

position: fixed;

right: 0;

top: 50%;

margin-top: -120px;

background: linear-gradient(to bottom,rgba(0,152,219,1),rgba(147,208,237,.6));

color: #fff;

font-family: '微软雅黑';

padding: 10px;

}

</style>

</head>

<body>

<div class="con">

<div class="lef">

<div class="tit">Web<br>前端工程师</div>

<div class="border"></div>

<div class="text"><a href="#">职业路径 ></a></div>

</div>

<div class="rig">

<div class="tit">Java<br>工程师</div>

<div class="border"></div>

<div class="text"><a href="#">职业路径 ></a></div>

</div>

</div>

</body>

</html>


写回答

1回答

好帮手慕糖

2017-12-08

实现的效果没有问题哦,继续加油!

祝学习愉快~

0

0 学习 · 36712 问题

查看课程

相似问题