atitan/coursenote

View on GitHub
app/assets/stylesheets/githubribbon.css

Summary

Maintainability
Test Coverage
#forkongithub {
  display: none;
}
#forkongithub a {
  background: #007BA7;
  color: #fff;
  text-decoration: none;
  font-family: arial, sans-serif;
  text-align: center;
  font-weight: bold;
  padding: 5px 45px;
  font-size: 1rem;
  line-height: 2rem;
  position: relative;
  transition: 0.5s;
}
#forkongithub a:hover {
  background: #175e92;
  color: #fff;
}
#forkongithub a::before, #forkongithub a::after {
  content: "";
  width: 100%;
  display: block;
  position: absolute;
  top: 1px;
  left: 0;
  height: 1px;
  background: #fff;
}
#forkongithub a::after {
  bottom: 1px;
  top: auto;
}

@media screen and (min-width:800px) {
  #forkongithub {
    position: absolute;
    display: block;
    top: 0;
    right: 0;
    width: 200px;
    overflow: hidden;
    height: 200px;
    z-index: 9;
  }
  #forkongithub a{
    width: 200px;
    position: absolute;
    top: 85px;
    right: -40px;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    -moz-transform: rotate(45deg);
    -o-transform: rotate(45deg);
    transform: rotate(45deg);
    box-shadow: 4px 4px 10px rgba(0,0,0,0.8);
  }
}