Skip to content

Instantly share code, notes, and snippets.

@bartaz
Last active May 14, 2021 13:15
Show Gist options
  • Save bartaz/8d09721284ca89e98129 to your computer and use it in GitHub Desktop.
Save bartaz/8d09721284ca89e98129 to your computer and use it in GitHub Desktop.
Two circles connected with a line.
/*
Two circles connected with a line.
See: https://github.com/bartaz/impress.js/issues/460
*/
body {
background: #BADA55;
}
.step {
position: absolute;
height: 100px;
width: 100px;
border-radius: 50%;
background: white;
line-height: 100px;
text-align: center;
}
.step-one {
top: 10px;
left: 10px;
}
/* line as pseudo element in step one */
.step-one::after {
content: "";
/* position it in the middle of the circle */
position: absolute;
top: 50%;
left: 50%;
/* connect circles with a line */
width: 200px;
height: 0;
border-bottom: 3px solid black;
/* make sure it's behind the circles */
z-index: -1;
}
.step-two {
top: 10px;
left: 200px;
}
<div class="step step-one">One</div>
<div class="step step-two">Two</div>
// alert('Hello world!');
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment