Tweak the hexagon component to use the SVG background image
This commit is contained in:
parent
6f7477eecf
commit
378e4315ba
1 changed files with 6 additions and 27 deletions
|
|
@ -4,35 +4,14 @@
|
|||
|
||||
<style lang="scss">
|
||||
.hexagon {
|
||||
position: relative;
|
||||
width: 100px;
|
||||
height: 57.74px;
|
||||
background-color: #000000;
|
||||
margin: 28.87px 0;
|
||||
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background-image: url(/assets/hexagon.svg);
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.hexagon:before,
|
||||
.hexagon:after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
width: 0;
|
||||
border-left: 50px solid transparent;
|
||||
border-right: 50px solid transparent;
|
||||
}
|
||||
|
||||
.hexagon:before {
|
||||
bottom: 100%;
|
||||
border-bottom: 28.87px solid #000000;
|
||||
}
|
||||
|
||||
.hexagon:after {
|
||||
top: 100%;
|
||||
width: 0;
|
||||
border-top: 28.87px solid #000000;
|
||||
z-index: -1;
|
||||
color: white;
|
||||
}
|
||||
</style>
|
||||
Loading…
Add table
Add a link
Reference in a new issue