Customizing The user Group Banner With CSS and Adding Animation

XF 2 Tip Customizing The user Group Banner With CSS and Adding Animation

DareSec

Inforc3r
Staff member
Administrator
Moderator
S.V.I.P Member
Collaborate
Registered
Joined
May 25, 2019
Messages
1,388
Points
523

Reputation:

DareDevil submitted a new resource:

Customizing The user Group Banner With CSS - user Group Banner customize


These instructions will explain how to Customizing for user banners.

Give the banner a title:
I given admin for example

Choose a class name for your custom class, in this example we are using admin
Add it to the custom CSS field for the user group, like so:

Go to extra.less template according to your style you are using

paste this code

.admin { display: inline-block; text-align: center; font-size: .7em; padding: .5em 0em...

Read more about this resource...
 

Apih

Well-known member
Registered
Joined
Sep 2, 2019
Messages
54
Points
28

Reputation:

hi sir
can u explain more about add animation
i already tried it
its not working
 

BattleKing

Spirit of darkness
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P Member
Collaborate
Registered
Joined
May 24, 2020
Messages
3,529
Points
523

Reputation:

hi sir
can u explain more about add animation
i already tried it
its not working
ApihThe CSS code has to look like:

CSS:
.admin {
    display: inline-block;
    text-align: center;
    font-size: .7em;
    padding: .5em 0em;
    font-weight: 500;
    color: #fff;
    background: #A9A9A9;
    text-transform: uppercase;
    border: none;
    position: relative;
    overflow: hidden;
}

.admin:before {
    content: "";
    position: absolute;
    background: linear-gradient(135deg, transparent 0%, transparent 30%, rgba(250,250,250,0.7) 50%, transparent 70%, transparent 100%);
    background-repeat: no-repeat;
    top: 0px;
    left: -80%;
    width: 100%;
    height: 100%;
    animation: light 2s infinite;
}
@keyframes light {
    0% {
        left: -80%;
    }
    100% {
        left: 80%;
    }
}
Please be aware to set the css banner text
1622388962600.png
 

Apih

Well-known member
Registered
Joined
Sep 2, 2019
Messages
54
Points
28

Reputation:

The CSS code has to look like:

CSS:
.admin {
    display: inline-block;
    text-align: center;
    font-size: .7em;
    padding: .5em 0em;
    font-weight: 500;
    color: #fff;
    background: #A9A9A9;
    text-transform: uppercase;
    border: none;
    position: relative;
    overflow: hidden;
}

.admin:before {
    content: "";
    position: absolute;
    background: linear-gradient(135deg, transparent 0%, transparent 30%, rgba(250,250,250,0.7) 50%, transparent 70%, transparent 100%);
    background-repeat: no-repeat;
    top: 0px;
    left: -80%;
    width: 100%;
    height: 100%;
    animation: light 2s infinite;
}
@keyframes light {
    0% {
        left: -80%;
    }
    100% {
        left: 80%;
    }
}
Please be aware to set the css banner text
View attachment 21990
BattleKingthxx
now it works
 

Soft4Win

Developer
Staff member
Moderator
Collaborate
Registered
Joined
Apr 27, 2019
Messages
368
Points
103

Reputation:

There is no permission error when opening the resources
 
Top