Skip to content

Instantly share code, notes, and snippets.

@tangoabcdelta
Last active October 9, 2024 11:57
Show Gist options
  • Save tangoabcdelta/134380ec63007fe68a3531e50edaed69 to your computer and use it in GitHub Desktop.
Save tangoabcdelta/134380ec63007fe68a3531e50edaed69 to your computer and use it in GitHub Desktop.
Uneven Border Designs
div {
width: 100%;
margin-top: 5%;
text-align: center;
}
p {
display: inline-block;
width: 20%;
margin: 5% auto;
border-radius: 255px 15px 225px 15px/15px 225px 15px 255px;
padding: 1em;
line-height: 1.5em;
background: hsla(67, 95%, 95%, 1);
transition: transform 0.3s ease-in-out;
}
p:hover {
transform: scale(1.1) rotate(5deg);
}
#one, #two, #three {
animation: borderAnimation 5s infinite, colorAnimation 5s infinite, shapeAnimation 5s infinite;
}
@keyframes borderAnimation {
0%, 100% {
border-width: 5px;
}
50% {
border-width: 15px;
}
}
@keyframes colorAnimation {
0%, 100% {
border-color: hsla(0, 95%, 35%, 1);
}
50% {
border-color: hsla(200, 95%, 35%, 1);
}
}
@keyframes shapeAnimation {
0%, 100% {
border-radius: 255px 15px 225px 15px/15px 225px 15px 255px;
}
50% {
border-radius: 15px 255px 15px 225px/225px 15px 255px 15px;
}
}
div {
width: 100%;
margin-top: 5%;
text-align: center;
}
p {
display: inline-block;
width: 20%;
margin: 5% auto;
border-radius: 255px 15px 225px 15px/15px 225px 15px 255px;
padding: 1em;
line-height: 1.5em;
background: hsla(67, 95%, 95%, 1);
transition: transform 0.3s ease-in-out;
}
p:hover {
transform: scale(1.1) rotate(5deg);
}
#one {
border: solid 5px hsla(0, 95%, 35%, 1);
background: linear-gradient(45deg, hsla(0, 95%, 35%, 0.5), hsla(67, 95%, 95%, 0.5));
animation: borderAnimation 2s infinite;
}
#two {
border: dotted 5px hsla(0, 95%, 35%, 1);
background: linear-gradient(45deg, hsla(0, 95%, 35%, 0.5), hsla(67, 95%, 95%, 0.5));
animation: borderAnimation 2s infinite;
}
#three {
border: dashed 5px hsla(0, 95%, 35%, 1);
background: linear-gradient(45deg, hsla(0, 95%, 35%, 0.5), hsla(67, 95%, 95%, 0.5));
animation: borderAnimation 2s infinite;
}
@keyframes borderAnimation {
0% {
border-width: 5px;
}
50% {
border-width: 10px;
}
100% {
border-width: 5px;
}
}
div{
width:100%;
margin-top:5%;
text-align:center;
}
p{
display:inline-block;
width:20%;
margin:5% auto;
border-radius: 255px 15px 225px 15px/15px 225px 15px 255px;
padding:1em;
line-height:1.5em;
background:hsla(67, 95%, 95%, 1);
}
#one {
border:solid 5px hsla(0, 95%, 35%, 1);
}
#two{
border:dotted 5px hsla(0, 95%, 35%, 1);
}
#three{
border:dashed 5px hsla(0, 95%, 35%, 1);
}
<div>
<p id ='one'>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
</p>
<p id = 'two'>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
</p>
<p id = 'three'>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
</p>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment