Created
January 7, 2019 02:11
-
-
Save sorie/c24968d429111cee06b3502e36b023b6 to your computer and use it in GitHub Desktop.
JS Bin // source https://jsbin.com/wajoxaw
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
<style id="jsbin-css"> | |
body{font-family:Helvetica} | |
div{width:300px;margin:auto} | |
p{border-top:2px dashed;border-color:blue !important;margin:0;padding:30px;counter-increment:section;position:relative} | |
p:nth-child(even):before{ | |
content: counter(section); | |
right:100%; | |
margin-right:-20px; | |
position:absolute; | |
border-radius:50%; | |
padding:10px; | |
height:20px; | |
width:20px; | |
background-color:blue; | |
text-align:center; | |
color:white; | |
font-size:110%; | |
} | |
p:nth-child(odd):before{ | |
content:counter(section); | |
left:100%; | |
margin-left:-20px; | |
position:absolute; | |
border-radius:50%; | |
padding:10px; | |
height:20px; | |
width:20px; | |
background-color:blue; | |
text-align:center; | |
color:white; | |
font-size:110%; | |
} | |
p:nth-child(even){ | |
border-left:2px dashed; | |
border-top-left-radius:30px; | |
border-bottom-left-radius:30px; | |
margin-right:30px; | |
padding-right:0; | |
} | |
p:nth-child(odd){ | |
border-right:2px dashed; | |
border-top-right-radius:30px; | |
border-bottom-right-radius:30px; | |
margin-left:30px; | |
padding-left:0; | |
} | |
</style> | |
</head> | |
<body> | |
<div> | |
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Adipisci, iste iusto quas eligendi corporis id eius corrupti temporibus velit? Molestias harum voluptatibus veritatis explicabo ut velit deserunt, saepe sit commodi?</p> | |
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Adipisci, iste iusto quas eligendi corporis id eius corrupti temporibus velit? Molestias harum voluptatibus veritatis explicabo ut velit deserunt, saepe sit commodi?</p> | |
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Adipisci, iste iusto quas eligendi corporis id eius corrupti temporibus velit? Molestias harum voluptatibus veritatis explicabo ut velit deserunt, saepe sit commodi?</p> | |
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Adipisci, iste iusto quas eligendi corporis id eius corrupti temporibus velit? Molestias harum voluptatibus veritatis explicabo ut velit deserunt, saepe sit commodi?</p> | |
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Adipisci, iste iusto quas eligendi corporis id eius corrupti temporibus velit? Molestias harum voluptatibus veritatis explicabo ut velit deserunt, saepe sit commodi?</p> | |
</div> | |
<script id="jsbin-source-css" type="text/css">body{font-family:Helvetica} | |
div{width:300px;margin:auto} | |
p{border-top:2px dashed;border-color:blue !important;margin:0;padding:30px;counter-increment:section;position:relative} | |
p:nth-child(even):before{ | |
content: counter(section); | |
right:100%; | |
margin-right:-20px; | |
position:absolute; | |
border-radius:50%; | |
padding:10px; | |
height:20px; | |
width:20px; | |
background-color:blue; | |
text-align:center; | |
color:white; | |
font-size:110%; | |
} | |
p:nth-child(odd):before{ | |
content:counter(section); | |
left:100%; | |
margin-left:-20px; | |
position:absolute; | |
border-radius:50%; | |
padding:10px; | |
height:20px; | |
width:20px; | |
background-color:blue; | |
text-align:center; | |
color:white; | |
font-size:110%; | |
} | |
p:nth-child(even){ | |
border-left:2px dashed; | |
border-top-left-radius:30px; | |
border-bottom-left-radius:30px; | |
margin-right:30px; | |
padding-right:0; | |
} | |
p:nth-child(odd){ | |
border-right:2px dashed; | |
border-top-right-radius:30px; | |
border-bottom-right-radius:30px; | |
margin-left:30px; | |
padding-left:0; | |
}</script> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body{font-family:Helvetica} | |
div{width:300px;margin:auto} | |
p{border-top:2px dashed;border-color:blue !important;margin:0;padding:30px;counter-increment:section;position:relative} | |
p:nth-child(even):before{ | |
content: counter(section); | |
right:100%; | |
margin-right:-20px; | |
position:absolute; | |
border-radius:50%; | |
padding:10px; | |
height:20px; | |
width:20px; | |
background-color:blue; | |
text-align:center; | |
color:white; | |
font-size:110%; | |
} | |
p:nth-child(odd):before{ | |
content:counter(section); | |
left:100%; | |
margin-left:-20px; | |
position:absolute; | |
border-radius:50%; | |
padding:10px; | |
height:20px; | |
width:20px; | |
background-color:blue; | |
text-align:center; | |
color:white; | |
font-size:110%; | |
} | |
p:nth-child(even){ | |
border-left:2px dashed; | |
border-top-left-radius:30px; | |
border-bottom-left-radius:30px; | |
margin-right:30px; | |
padding-right:0; | |
} | |
p:nth-child(odd){ | |
border-right:2px dashed; | |
border-top-right-radius:30px; | |
border-bottom-right-radius:30px; | |
margin-left:30px; | |
padding-left:0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment