Skip to content

Commit 4a7a8b2

Browse files
Merge pull request #223 from Brianali-codes/main
Create rgb-border.md
2 parents 0f9d502 + fa3dc1e commit 4a7a8b2

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
title: RGB Border Color Animation
3+
description: changes border of an Element to rgb onhover (Can be changed)'
4+
author: Brianali-codes
5+
tags: animation,effects,borders
6+
---
7+
8+
```css
9+
.yourElement {
10+
/* Your Elements styles go here*/
11+
border-style: solid;
12+
border-radius: 10px;
13+
color: rgb(0, 0, 0);
14+
15+
}
16+
.yourElement:hover {
17+
18+
animation: change-color;
19+
animation-duration: 0.5s; /* you can alter the duration of the animation here. */
20+
animation-iteration-count: infinite; /* Choose to play animation infinitely or once on hover. */
21+
}
22+
23+
@keyframes change-color {
24+
0% {
25+
border-color: red;
26+
}
27+
28+
50% {
29+
border-color: green;
30+
}
31+
32+
100% {
33+
border-color: blue;
34+
}
35+
}
36+
37+
38+
```

0 commit comments

Comments
 (0)