Skip to content
View in the app

A better way to browse. Learn more.

Royal Hack

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[HTML5/CSS3] Achievement -style skillbars

Featured Replies

HTML

	<div class="achievement-box">
  <div class="achievement-box-icon">
  </div>
  <div class="achievement-box-namebar-area">
    <span>[skill_goes_here]</span>
     <div class="achievement-box-bar">
       <div class="achievement-box-status-25">
       </div>
     </div>
  </div>
</div>
<div class="achievement-box">
  <div class="achievement-box-icon">
  </div>
  <div class="achievement-box-namebar-area">
    <span>[skill_goes_here]</span>
     <div class="achievement-box-bar">
       <div class="achievement-box-status-50">
       </div>
     </div>
  </div>
</div>
<div class="achievement-box">
  <div class="achievement-box-icon">
  </div>
  <div class="achievement-box-namebar-area">
    <span>[skill_goes_here]</span>
     <div class="achievement-box-bar">
       <div class="achievement-box-status-75">
       </div>
     </div>
  </div>
</div>
<div class="achievement-box">
  <div class="achievement-box-icon">
  </div>
  <div class="achievement-box-namebar-area">
    <span>[skill_goes_here]</span>
     <div class="achievement-box-bar">
       <div class="achievement-box-status-100">
       </div>
     </div>
  </div>
</div>
	

CSS

	body {
  background-color: rgb(25, 34, 50);
}
	.achievement-box {
  background-color: rgb(35, 48, 64);
  border: 2px solid rgb(64, 81, 102);
  display: flex;
  height: 120px;
  width: 540px;
}
	.achievement-box-icon {
  background-image: url("https://www.superiorengineering.com.au/image/webimages/auto-mechanical-black-cogs-icon.png");
  border: 5px solid rgb(75, 92, 105);
  outline: 2px solid rgb(64, 81, 102);
  height: 110px;
  width: 110px;
}
	.achievement-box-namebar-area {
  color: white;
  display: inline-flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-around;
  margin: 20px;
  height: 80px;
}
	.achievement-box-bar {
  background-color: rgb(49, 83, 107);
  border: 1px solid rgb(64, 81, 102);
  height: 14px;
  width: 380px;
}
	@keyframes skill-25 {
  from { width: 0px; }
  to { width: 95px; }
}
	@keyframes skill-50 {
  from {
    background-color: rgb(255,0,0);
    width: 0px;
  }
  to {
    width: 190px;
  }
}
	@keyframes skill-75 {
   from {
    background-color: rgb(255,0,0);
    width: 0px;
  }
  to { width: 280px; }
}
	@keyframes skill-100 {
   from {
    background-color: rgb(255,0,0);
    width: 0px;
  }
  to { width: 376px; }
}
	.achievement-box-status-25 {
  background-color: rgb(255,0,0);
  margin: 2px;
  margin-left: 3px;
  height: 9px;
  width: 95px;
  animation: skill-25 5s;
}
	.achievement-box-status-50 {
  background-color: rgb(255,255,0);
  margin: 2px;
  height: 10px;
  width: 190px;
  animation: skill-50 5s;
}
	.achievement-box-status-75 {
  background-color: rgb(100,255,120);
  margin: 2px;
  height: 9px;
  width: 285px;
  animation: skill-75 5s;
}
	.achievement-box-status-100 {
  background-color: rgb(0,255,0);
  margin: 2px;
  height: 9px;
  width: 376px;
  animation: skill-100 5s;
}
	

RESULT

skillbar.gif

  • Author

background-image was not supposed to stay in CSS file, instead be done with inline-css, brainfart WutFace
 

style="background-image: url("www.whatever.com/whatever.png");"

I'm sure this could be done better with SASS since it lets you use variables.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Important Information

Read Terms of Use to continue

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.