Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Software Development
Programming
CSS Ribbon Flags
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Markshall" data-source="post: 440798" data-attributes="member: 1872"><p>An old effect that seems to be crawling it's way back into websites lately is the ribbon-flag effect.</p><p></p><p>I saw a <a href="https://dribbble.com/shots/5546698-Journey-Into-The-Beyond-Symbols" target="_blank">post on Dribbble</a> and liked the look of them, plus it gave me the opportunity to put clip-path to use as I've never used it before, so this is the result.</p><p></p><p><img src="https://i.sharefa.st/uuZMw4CNo4D3.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></p><p></p><p><a href="https://codepen.io/Markshall/pen/zMZWem" target="_blank">https://codepen.io/Markshall/pen/zMZWem</a></p><p></p><p>SCSS:</p><p>[PHP]</p><p>.ribbon-flag {</p><p> background-color: #c72c26;</p><p> display: inline-block;</p><p> padding: 30px 10px;</p><p> clip-path: polygon(0% 100%, 0% 0%, 100% 0%, 100% 100%, 50% 90%);</p><p> transition: padding-bottom .3s ease;</p><p> cursor: pointer;</p><p> user-select: none;</p><p> </p><p> &.yellow {background-color: #fcc70d;}</p><p> &.blue {background-color: #406ab3;}</p><p> &.green {background-color: #12a14a;}</p><p></p><p> &:hover {</p><p> padding-bottom: 35px;</p><p> }</p><p>}[/PHP]</p><p></p><p>HTML usage:</p><p>[PHP]<div class="ribbon-flag yellow">Hey</div>[/PHP]</p><p></p><p>Take and use them as you wish if you like.</p><p></p><p>Mark</p></blockquote><p></p>
[QUOTE="Markshall, post: 440798, member: 1872"] An old effect that seems to be crawling it's way back into websites lately is the ribbon-flag effect. I saw a [URL='https://dribbble.com/shots/5546698-Journey-Into-The-Beyond-Symbols']post on Dribbble[/URL] and liked the look of them, plus it gave me the opportunity to put clip-path to use as I've never used it before, so this is the result. [IMG]https://i.sharefa.st/uuZMw4CNo4D3.png[/IMG] [URL]https://codepen.io/Markshall/pen/zMZWem[/URL] SCSS: [PHP] .ribbon-flag { background-color: #c72c26; display: inline-block; padding: 30px 10px; clip-path: polygon(0% 100%, 0% 0%, 100% 0%, 100% 100%, 50% 90%); transition: padding-bottom .3s ease; cursor: pointer; user-select: none; &.yellow {background-color: #fcc70d;} &.blue {background-color: #406ab3;} &.green {background-color: #12a14a;} &:hover { padding-bottom: 35px; } }[/PHP] HTML usage: [PHP]<div class="ribbon-flag yellow">Hey</div>[/PHP] Take and use them as you wish if you like. Mark [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Software Development
Programming
CSS Ribbon Flags
Top