css实现一个转角时间线大事记代码

代码语言:html

所属分类:布局界面

代码描述:css实现一个转角时间线大事记代码

代码标签: 转角 时间 线 大事记

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开


<!DOCTYPE html>
<html lang="en" >

<head>

  <meta charset="UTF-8">
  


  <meta name="viewport" content="width=device-width, initial-scale=1">


  
  
<style>
@import url("https://fonts.googleapis.com/css?family=Open+Sans:400,400i,700");
body {
  font-family: "Open Sans", sans-serif;
  margin: 0;
  padding: 0 4em;
}

main {
  min-width: 300px;
  max-width: 500px;
  margin: auto;
}

p {
  font-size: 1em;
  line-height: 1.75em;
  border-top: 3px solid;
  -o-border-image: linear-gradient(to right, #743ad5 0%, #d53a9d 100%);
     border-image: linear-gradient(to right, #743ad5 0%, #d53a9d 100%);
  border-image-slice: 1;
  border-width: 3px;
  margin: 0;
  padding: 40px;
  counter-increment: section;
  position: relative;
  color: #34435E;
}
p:before {
  content: counter(section);
  position: absolute;
  border-radius: 50%;
  padding: 10px;
  height: 1.25em;
  width: 1.25em;
  background-color: #34435E;
  text-align: center;
  line-height: 1.25em;
  color: #ffffff;
  font-size: 1em;
}

p:nth-child(odd) {
  border-right: 3px solid;
  padding-left: 0;
}
p:nth-child(odd):before {
  left: 100%;
  margin-left: -20px;
}

p:nth-child(even) {
  border-left: 3px solid;
  padding-right: 0;
}
p:nth-child(even):before .........完整代码请登录后点击上方下载按钮下载查看

网友评论0