Scrolling to an anchor with pure CSS - html

I've been trying to scroll from a bootstrap nav links to matching anchors on my page using only CSS (no jquery). This answer from #jesus-bejarano (CSS: pure CSS scroll animation) with matching jsfiddle (http://jsfiddle.net/YYPKM/3/) seems to be a great solution but I can't seem to get it working. Any help would be much appreciated.
Here is a link to a bootply with what I've got: http://www.bootply.com/15Ib1TGYeV
Appreciate the help.
My HTML:
<a id="suds"></a>
<a id="apoth"></a>
<a id="merch"></a>
<div class="container-fluid container-fullwidth" id="" style="">
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<!-- <div class="container-fluid"> -->
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> <span class="sr-only">Toggle navigation</span>
<span class="fa fa-bars fa-lg"></span>
<!-- <span class="icon-bar"></span> <span class="icon-bar"></span> -->
</button> <a class="navbar-brand" href="#"><span class="fa fa-long-arrow-left"></span></a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li>Suds
</li>
<li>Apothecary and Men's Grooming
</li>
<li>Gifts and Merchandise
</li>
</ul>
</div>
<!-- /.navbar-collapse -->
<!-- </div> -->
<!-- /.container-fluid -->
</nav>
<section class="row no-gutter main">
<article class="merch-cat" id="suds">
<div class="col-lg-4 col-sm-6 col-xs-12">
<img src="http://placehold.it/600X400" class="img-responsive">
</div>
<div class="col-lg-4 col-sm-6 col-xs-12">
<img src="http://placehold.it/600X400" class="img-responsive">
</div>
<div class="col-lg-4 col-sm-6 col-xs-12">
<img src="http://placehold.it/600X400" class="img-responsive">
</div>
<div class="col-lg-4 col-sm-6 col-xs-12">
<img src="http://placehold.it/600X400" class="img-responsive">
</div>
<div class="col-lg-4 col-sm-6 col-xs-12">
<img src="http://placehold.it/600X400" class="img-responsive">
</div>
<div class="col-lg-4 col-sm-6 col-xs-12">
<img src="http://placehold.it/600X400" class="img-responsive">
</div>
</article>
<article class="merch-cat" id="apoth">
<div class="col-lg-4 col-sm-6 col-xs-12">
<img src="http://placehold.it/600X400" class="img-responsive">
</div>
<div class="col-lg-4 col-sm-6 col-xs-12">
<img src="http://placehold.it/600X400" class="img-responsive">
</div>
<div class="col-lg-4 col-sm-6 col-xs-12">
<img src="http://placehold.it/600X400" class="img-responsive">
</div>
</article>
<article class="merch-cat" id="merch">
<div class="col-lg-4 col-sm-6 col-xs-12">
<img src="http://placehold.it/600X400" class="img-responsive">
</div>
<div class="col-lg-4 col-sm-6 col-xs-12">
<img src="http://placehold.it/600X400" class="img-responsive">
</div>
<div class="col-lg-4 col-sm-6 col-xs-12">
<img src="http://placehold.it/600X400" class="img-responsive">
</div>
</article>
</section>
</div>
My CSS:
/* add a little bottom space under the images */
body {
padding-top: 0px;
}
.thumbnail {
margin-bottom:0;
}
.row.no-gutter {
margin-left: 0;
margin-right: 0;
}
.row.no-gutter [class*='col-']:not(:first-child),
.row.no-gutter [class*='col-']:not(:last-child) {
padding-right: 0;
padding-left: 0;
}
.container-fullwidth {
width: 100%;
}
/* make nav always collapsed */
#media (max-width: 2000px) {
.navbar-header {
float: none;
}
.navbar-left,.navbar-right {
float: none !important;
}
.navbar-toggle {
display: block;
}
.navbar-collapse {
border-top: 1px solid transparent;
box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
}
.navbar-fixed-top {
top: 0;
border-width: 0 0 1px;
}
.navbar-collapse.collapse {
display: none!important;
}
.navbar-nav {
float: none!important;
margin-top: 7.5px;
}
.navbar-nav>li {
float: none;
}
.navbar-nav>li>a {
padding-top: 10px;
padding-bottom: 10px;
}
.collapse.in{
display:block !important;
}
}
/* nav opacity */
nav {
opacity: 0.5
}
/* scrolling */
a[ id= "suds" ]:target ~ #main article.merch-cat {
-webkit-transform: translateY( 0px);
transform: translateY( 0px );
}
a[ id= "apoth" ]:target ~ #main article.merch-cat {
-webkit-transform: translateY( -500px );
transform: translateY( -500px );
}
a[ id= "merch" ]:target ~ #main article.merch-cat {
-webkit-transform: translateY( -1000px );
transform: translateY( -1000px );
}

don't know if this will help you any.. but i used this on a profile of mine to scroll certain items
#-webkit-keyframes buzz-out {
10% {
-webkit-transform:translateX(3px) rotate(2deg);
transform:translateX(3px) rotate(2deg);
}
20% {
-webkit-transform:translateX(-3px) rotate(-2deg);
transform:translateX(-3px) rotate(-2deg);
}
30% {
-webkit-transform:translateX(3px) rotate(2deg);
transform:translateX(3px) rotate(2deg);
}
40% {
-webkit-transform:translateX(-3px) rotate(-2deg);
transform:translateX(-3px) rotate(-2deg);
}
50% {
-webkit-transform:translateX(2px) rotate(1deg);
transform:translateX(2px) rotate(1deg);
}
60% {
-webkit-transform:translateX(-2px) rotate(-1deg);
transform:translateX(-2px) rotate(-1deg);
}
70% {
-webkit-transform:translateX(2px) rotate(1deg);
transform:translateX(2px) rotate(1deg);
}
80% {
-webkit-transform:translateX(-2px) rotate(-1deg);
transform:translateX(-2px) rotate(-1deg);
}
90% {
-webkit-transform:translateX(1px) rotate(0);
transform:translateX(1px) rotate(0);
}
100% {
-webkit-transform:translateX(-1px) rotate(0);
transform:translateX(-1px) rotate(0);
}
}
#keyframes buzz-out {
10% {
-webkit-transform:translateX(3px) rotate(2deg);
-ms-transform:translateX(3px) rotate(2deg);
transform:translateX(3px) rotate(2deg);
}
20% {
-webkit-transform:translateX(-3px) rotate(-2deg);
-ms-transform:translateX(-3px) rotate(-2deg);
transform:translateX(-3px) rotate(-2deg);
}
30% {
-webkit-transform:translateX(3px) rotate(2deg);
-ms-transform:translateX(3px) rotate(2deg);
transform:translateX(3px) rotate(2deg);
}
40% {
-webkit-transform:translateX(-3px) rotate(-2deg);
-ms-transform:translateX(-3px) rotate(-2deg);
transform:translateX(-3px) rotate(-2deg);
}
50% {
-webkit-transform:translateX(2px) rotate(1deg);
-ms-transform:translateX(2px) rotate(1deg);
transform:translateX(2px) rotate(1deg);
}
60% {
-webkit-transform:translateX(-2px) rotate(-1deg);
-ms-transform:translateX(-2px) rotate(-1deg);
transform:translateX(-2px) rotate(-1deg);
}
70% {
-webkit-transform:translateX(2px) rotate(1deg);
-ms-transform:translateX(2px) rotate(1deg);
transform:translateX(2px) rotate(1deg);
}
80% {
-webkit-transform:translateX(-2px) rotate(-1deg);
-ms-transform:translateX(-2px) rotate(-1deg);
transform:translateX(-2px) rotate(-1deg);
}
90% {
-webkit-transform:translateX(1px) rotate(0);
-ms-transform:translateX(1px) rotate(0);
transform:translateX(1px) rotate(0);
}
100% {
-webkit-transform:translateX(-1px) rotate(0);
-ms-transform:translateX(-1px) rotate(0);
transform:translateX(-1px) rotate(0);
}
}

#misterManSam
#charset "UTF-8";
html {
background:url(https://googledrive.com/host/0B6ETuSl1xvFHZVY1TGlFb0dlLVE/back.png) no-repeat center 0,#000 url(https://googledrive.com/host/t0B6ETuSl1xvFHZVY1TGlFb0dlLVE/back.gif) left top;
}
img {
-webkit-border-radius:8px;
-moz-border-radius:8px;
border-radius:8px;
}
.mnmembers {
margin:50px -20px;
}
body {
font-family:Trebuchet MS,Arial,Helvetica;
text-align:center;
}
body,td {
color:#fff;
font-size:12px;
}
.friends_value img {
border:0;
}
td .clock {
font-size:23px;
}
.container_padding {
height:100%;
}
.gallery_image img {
margin:5px;
}
.gallery_image {
border:0;
}
.container_transparency {
height:100%;
width:100%;
}
.container {
height:100%;
background-color:transparent;
}
.container .heading {
color:#FF00CC;
text-shadow:2px 2px 2px rgba(255,255,255,0.2);
font-weight:bold;
font-family:Cabin Sketch,sans-serif;
font-size:20px;
}
.about_me .value {
color:#FF00CC;
font-size:15px;
}
.container table {
margin:15px;
}
.container table table {
border:0;
background:none;
}
#framepo {
text-align:center;
margin:0 150px;
}
#myvid {
margin:1000px 10px 0;
}
#stuff {
width:1194px;
overflow:hidden;
position:relative;
margin:1000px 0 0;
text-align:center;
}
.container table tr td.key {
background:#4a4057;
border-bottom:1px solid #443b50;
border-right:1px solid #383143;
}
.container table tr td.key,.container table tr td.friends_key {
padding:8px 8px 8px 20px;
}
.container table tr td.status_key,.container table tr td.blurb_key {
padding:3px 3px 3px 50px;
}
.wall_options textarea {
border:1px solid #0061aa;
background:rgba(0,0,0,0.25);
margin-top:20px 0 -20px 0;
}
a,a:link,a:active,a:visited,a:hover {
color:#fff;
}
.bottom_footer_wrapper {
bordet-top:#352f40 5px solid;
position:fixed;
bottom:0;
left:0;
width:100%;
z-index:9999;
}
#videocontainer {
z-index:1;
}
.bottom_footer_wrapper .bottom_footer {
background-color:#fff;
border-top:3px solid #fb15d3;
height:80px;
text-align:center;
}
.container a.desc-img img {
-moz-transform:rotate(-2deg);
-webkit-transform:rotate(-2deg);
}
div.gallery_content:hover {
bottom:0;
}
div.gallery_content .gallery_image {
font-size:12px;
width:175px;
text-align:center;
margin:0!important;
}
input[name='strip_links'] {
margin-bottom:170px;
}
input[type='submit'] {
background:none;
display:block;
margin-top:25px;
letter-spacing:-1px;
border-width:1px;
border-style:solid;
border-color:#ccc #444 #111;
border-color:rgba(255,255,255,0.7) rgba(0,0,0,0.5) rgba(0,0,0,0.7);
font:bold 21px1em Arial;
color:white;
padding:.48em 2em;
cursor:pointer;
text-shadow:rgba(0,0,0,0.45) 0 -1px 0;
-webkit-box-shadow:rgba(0,0,0,0.75) 0 0 3px;
-moz-box-shadow:rgba(0,0,0,0.75) 0 0 3px;
box-shadow:rgba(0,0,0,0.75) 0 0 3px;
-webkit-border-radius:7px;
-moz-border-radius:7px;
border-radius:7px;
background:transparent -webkit-gradient(linear,left top,left bottom,from(rgba(255,255,255,0.6)),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.5,rgba(255,255,255,0.01)),to(transparent));
background:transparent -moz-linear-gradient(top,rgba(255,255,255,0.6),rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.01) 50%,transparent);
filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorstr='#80FFFFFF',EndColorstr='#00FFFFFF');
-webkit-background-clip:padding-box;
}
input[type='submit']:hover {
border-top-color:rgba(255,255,255,0.65);
background:-webkit-gradient(linear,left top,left bottom,from(rgba(220,220,220,0.6)),color-stop(0.5,rgba(100,100,100,0.2)),color-stop(0.5,rgba(0,0,0,0.21)),to(rgba(0,0,0,0.20)));
background:-moz-linear-gradient(top,rgba(220,220,220,0.6),rgba(100,100,100,0.2) 50%,rgba(0,0,0,0.21) 50%,rgba(0,0,0,0.20));
filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr='#99dcdcdc',EndColorStr='#33000000');
-webkit-background-clip:padding-box;
}
textarea {
color:#666;
font-size:14px;
-moz-border-radius:8px;
-webkit-border-radius:8px;
padding:0 10px;
margin:15px 0;
border:#999 1px solid;
font-family:'Lucida Sans Unicode','Lucida Grande',sans-serif;
transition:all .25s ease-in-out;
-webkit-transition:all .25s ease-in-out;
-moz-transition:all .25s ease-in-out;
box-shadow:0 0 5px rgba(81,203,238,0);
-webkit-box-shadow:0 0 5px rgba(81,203,238,0);
-moz-box-shadow:0 0 5px rgba(81,203,238,0);
}
textarea#styleid:focus {
color:#000;
outline:none;
border:#35a5e5 1px solid;
font-family:'Lucida Sans Unicode','Lucida Grande',sans-serif;
box-shadow:0 0 5px rgba(81,203,238,1);
-webkit-box-shadow:0 0 5px rgba(81,203,238,1);
-moz-box-shadow:0 0 5px rgba(81,203,238,1);
}
.container .interests_body a img,.container img.thumbnail {
-moz-transform:rotate(0deg);
-webkit-transform:rotate(0deg);
}
#schedule table {
margin-top:10px;
text-align:center;
border:1px solid #81729a;
-webkit-border-radius:5px;
-moz-border-radius:5px;
border-radius:5px;
border-top-left-radius:5px;
-webkit-box-shadow:0 1px 3px 1px rgba(0,0,0,.05);
-moz-box-shadow:0 1px 3px 1px rgba(0,0,0,.05);
box-shadow:0 1px 3px 1px rgba(0,0,0,.05);
}
#schedule tr:last-child td {
border-bottom:none!important;
}
#schedule tr:first-child td {
border-top:none!important;
}
#schedule td:last-child {
border-right:none!important;
}
#schedule td {
border-top:2px solid #81729a;
border-bottom:1px solid #81729a;
border-right:1px solid #81729a;
padding:13px 8px;
}
#profile {
width:1202px;
left:50%;
position:absolute;
text-align:left;
margin-left:-601px;
}
#profile_schedule {
position:absolute;
top:2060px;
left:220px;
color:#000;
text-transform:uppercase;
z-index:0;
width:auto;
}
#profile_friends {
position:absolute;
left:0;
top:0;
color:#fff;
}
#profile_password_photo_galleries {
position:absolute;
top:2600px;
width:100%;
}
#profile_password_photo_galleries .heading {
font-size:20px;
}
#profile_schedule .heading {
color:#ff0084;
font-size:25px;
margin:0;
}
#profile_schedule > .profile_section_content .container {
padding:2px 0;
display:block;
}
#profile_schedule > .profile_section_content .container .label {
width:150px;
color:#d25581;
display:inline-block;
float:left;
}
#profile_main_photo,.flagCounter,#username_container,#gender_container,#body_type_container,#ethnicity_container,#cam_score_container,#hair_container,#eyes_container,#weight_container,#age_container,#country_container,#sexual_preference_container,#smoke_container,#drink_container,#occupation_container,#school_container,#favorite_food_container,#pets_container,#automobile_container,#tags_container,#profile_about_me .label,#profile_about_me > .heading {
display:none;
}
#profile_main_about_holder {
display:block;
}
#profile_photo_galleries {
position:absolute;
top:2900px;
width:100%;
}
#profile_friends {
position:absolute;
left:220px;
top:2300px;
color:#fff;
width:1000px;
font-size:12px;
}
#profile .profile_row:first-child {
display:none;
position:absolute;
left:412px;
top:420px;
color:#000!important;
width:400px;
}
#profile .profile_row:first-child a:link,#profile .profile_row:first-child a:active,#profile .profile_row:first-child a:visited,#profile .profile_row:first-child a:hover {
color:#f99dde;
}
#profile_interests_content {
display:none;
}
#profile_comments {
position:absolute;
top:2950px;
width:auto;
width:100%;
}
.wall_post {
background:RGBa(0,0,0,0.8);
padding:10px;
margin:0 0 20px;
}
#photo_gallery_previews {
}
#header_bar {
display:none;
}
#footer_bar {
display:none;
}
a.button {
position:absolute;
display:block;
}
a.button.amazon-link {
width:250px;
height:87px;
background:url(https://googledrive.com/host/0B6ETuSl1xvFHZVY1TGlFb0dlLVE/amazon.png);
top:750px;
left:620px;
}
a.button.twitter-link {
width:250px;
height:87px;
background:url(https://googledrive.com/host/0B6ETuSl1xvFHZVY1TGlFb0dlLVE/twitter.png);
top:750px;
left:50px;
}
a.button.offtip-link {
width:250px;
height:89px;
background:url(https://googledrive.com/host/0B6ETuSl1xvFHZVY1TGlFb0dlLVE/offtip.png);
top:750px;
left:340px;
}
/* Gallery */
.photo_gallery_preview {
color:#fff;
width:160px;
}
.photo_gallery_preview > a {
-webkit-transition:all .5s ease;
-moz-transition:all .5s ease;
-o-transition:all .5s ease;
transition:all .5s ease;
}
.photo_gallery_preview > a:hover {
opacity:.7;
-moz-transform:rotate(-10deg);
-webkit-transform:rotate(-10deg);
}
.photo_gallery_preview .photo_gallery_count {
font-size:14px;
}
.photo_gallery_preview a,.photo_gallery_preview a:link,.photo_gallery_preview a:active,.photo_gallery_preview a:hover,.photo_gallery_preview a:visited {
color:#fff;
text-decoration:none;
white-space:nowrap;
}
#buttons.resize {
width:10%;
/* you can use % */
height:auto;
}
/* Nav and target */
#about_me_target {
position:absolute;
top:1000px;
}
ul.nav-profile {
background:#000000;
padding:20px;
-webkit-border-radius:30px;
-moz-webkit-border-radius:20px;
-ms-webkit-border-radius:20px;
-o-webkit-border-radius:20px;
webkit-border-radius:20px;
position:absolute;
top:630px;
left:480px;
width:660px;
opacity:.8;
filter:alpha(opacity=80);
}
ul.nav-profile li {
float:left;
margin-right:35px;
list-style:none;
}
ul.nav-profile li a,ul.nav-profile li a:link,ul.nav-profile li a:visited,ul.nav-profile li a:active,ul.nav-profile li a:hover {
color:#fff;
font-weight:bold;
font-size:22px;
-webkit-transition:all .5s ease;
-moz-transition:all .5s ease;
-o-transition:all .5s ease;
transition:all .5s ease;
text-decoration:none;
}
ul.nav-profile li a:hover {
color:#8B008B;
}
.frame {
width:920px;
height:540px;
overflow:auto;
background:#e5e5e5;
position:relative;
}
.frame-border {
width:920px;
height:540px;
background:#e5e5e5;
padding:10px;
border-radius:20px;
-moz-border-radius:12px;
-webkit-border-radius:20px;
-o-border-radius:12px;
margin:0 125px;
}
.firstvid {
margin-right:20px;
}
div.hover_icon_container {
width:430px;
height:107px;
position:relative;
float:left;
margin-bottom:10px;
}
div.hover_icon_container a.hover_icon {
display:none;
width:430px;
height:107px;
position:absolute;
top:0;
left:0;
}
div.hover_icon_container:hover a.hover_icon {
display:block;
}
.frame::-webkit-scrollbar {
-webkit-appearance:none;
width:12px;
height:12px;
}
.frame::-webkit-scrollbar-thumb {
border-radius:8px;
border:2px solid white;
background-color:#C71585;
}
div.gif1 {
position:absolute;
left:140px;
top:472px;
}
div.gif2 {
position:absolute;
left:310px;
top:472px;
}
div.gif3 {
position:absolute;
left:480px;
top:472px;
}
div.gif4 {
position:absolute;
left:650px;
top:472px;
}
#blackBar {
position:fixed;
top:0;
left:0;
width:100%;
height:60px;
background-color:black;
}
#-webkit-keyframes buzz-out {
10% {
-webkit-transform:translateX(3px) rotate(2deg);
transform:translateX(3px) rotate(2deg);
}
20% {
-webkit-transform:translateX(-3px) rotate(-2deg);
transform:translateX(-3px) rotate(-2deg);
}
30% {
-webkit-transform:translateX(3px) rotate(2deg);
transform:translateX(3px) rotate(2deg);
}
40% {
-webkit-transform:translateX(-3px) rotate(-2deg);
transform:translateX(-3px) rotate(-2deg);
}
50% {
-webkit-transform:translateX(2px) rotate(1deg);
transform:translateX(2px) rotate(1deg);
}
60% {
-webkit-transform:translateX(-2px) rotate(-1deg);
transform:translateX(-2px) rotate(-1deg);
}
70% {
-webkit-transform:translateX(2px) rotate(1deg);
transform:translateX(2px) rotate(1deg);
}
80% {
-webkit-transform:translateX(-2px) rotate(-1deg);
transform:translateX(-2px) rotate(-1deg);
}
90% {
-webkit-transform:translateX(1px) rotate(0);
transform:translateX(1px) rotate(0);
}
100% {
-webkit-transform:translateX(-1px) rotate(0);
transform:translateX(-1px) rotate(0);
}
}
#keyframes buzz-out {
10% {
-webkit-transform:translateX(3px) rotate(2deg);
-ms-transform:translateX(3px) rotate(2deg);
transform:translateX(3px) rotate(2deg);
}
20% {
-webkit-transform:translateX(-3px) rotate(-2deg);
-ms-transform:translateX(-3px) rotate(-2deg);
transform:translateX(-3px) rotate(-2deg);
}
30% {
-webkit-transform:translateX(3px) rotate(2deg);
-ms-transform:translateX(3px) rotate(2deg);
transform:translateX(3px) rotate(2deg);
}
40% {
-webkit-transform:translateX(-3px) rotate(-2deg);
-ms-transform:translateX(-3px) rotate(-2deg);
transform:translateX(-3px) rotate(-2deg);
}
50% {
-webkit-transform:translateX(2px) rotate(1deg);
-ms-transform:translateX(2px) rotate(1deg);
transform:translateX(2px) rotate(1deg);
}
60% {
-webkit-transform:translateX(-2px) rotate(-1deg);
-ms-transform:translateX(-2px) rotate(-1deg);
transform:translateX(-2px) rotate(-1deg);
}
70% {
-webkit-transform:translateX(2px) rotate(1deg);
-ms-transform:translateX(2px) rotate(1deg);
transform:translateX(2px) rotate(1deg);
}
80% {
-webkit-transform:translateX(-2px) rotate(-1deg);
-ms-transform:translateX(-2px) rotate(-1deg);
transform:translateX(-2px) rotate(-1deg);
}
90% {
-webkit-transform:translateX(1px) rotate(0);
-ms-transform:translateX(1px) rotate(0);
transform:translateX(1px) rotate(0);
}
100% {
-webkit-transform:translateX(-1px) rotate(0);
-ms-transform:translateX(-1px) rotate(0);
transform:translateX(-1px) rotate(0);
}
}
.button {
display:inline-block;
-webkit-transform:translateZ(0);
-ms-transform:translateZ(0);
transform:translateZ(0);
box-shadow:0 0 1px rgba(0,0,0,0);
}
.button:hover {
-webkit-animation-name:buzz-out;
animation-name:buzz-out;
-webkit-animation-duration:.75s;
animation-duration:.75s;
-webkit-animation-timing-function:linear;
animation-timing-function:linear;
-webkit-animation-iteration-count:1;
animation-iteration-count:1;
}
.framen {
width:600px;
height:200px;
overflow:auto;
background:#000;
border-radius:20px;
position:relative;
margin:70px 20px 0;
padding:10px;
}
.frame-bordern {
width:920px;
height:300px;
background:url(https://googledrive.com/host/0B6ETuSl1xvFHZVY1TGlFb0dlLVE/about.png);
padding:10px;
border-radius:20px;
-moz-border-radius:12px;
-webkit-border-radius:20px;
-o-border-radius:12px;
margin:0 125px;
}
.framen::-webkit-scrollbar {
-webkit-appearance:none;
width:12px;
height:12px;
}
.framen::-webkit-scrollbar-thumb {
border-radius:8px;
background-color:#C71585;
}
#profile_schedule {
display:none;
}
#new_comment {
display:none;
}
a.button.insta-link {
width:250px;
height:85px;
background:url(https://5a2e1bf9a2ce6e1087dbd9512e595cd127bfe686.googledrive.com/host/0B6ETuSl1xvFHZVY1TGlFb0dlLVE/instagram.png);
top:750px;
left:900px;
}
.design a {
text-decoration:none;
}
.design h1 {
font-size:14px;
font-family:"Franklin Gothic Medium","Franklin Gothic","ITC Franklin Gothic",Arial,sans-serif;
}

Related

Symbol is not in line with text

I want to animate this arrow but for some reason it is not in line with the text. could you help me please? :)
https://jsfiddle.net/e3ec86rg/
<div id="blogtitle">
<center>
<div id="arrow">⬇</div>
<div style="font-size:18px">Now go <span style="color:{color:permalink border}">that way</span></div>
</center>
edit: This is what bothers me the arrow is a little bit lower than the text.
It's due to float property. Add a negative margin to offset it...
#arrow {
font-size: 18px;
-webkit-animation: bounce 2s infinite ease-in-out;
margin-top: -2px; /* edit as you need */
float: left;
}
jsfiddle
#arrow {
font-size: 18px;
-webkit-animation: bounce 2s infinite ease-in-out;
margin-top: -2px;
float: left;
}
#-webkit-keyframes bounce {
0%,
20%,
60%,
100% {
-webkit-transform: translateY(0);
}
40% {
-webkit-transform: translateY(-20px);
}
80% {
-webkit-transform: translateY(-10px);
}
}
#blogtitle {
position: relative;
height: auto;
z-index: 5;
text-transform: uppercase;
color: {
color: blog title
}
;
font-size:150px;
letter-spacing:2px;
font-weight:bold;
text-align:left;
width:250px;
padding-top: 10px;
padding-left: 10px;
}
<div id="blogtitle">
<center>
<div id="arrow">⬇</div>
<div style="font-size:18px">Now go <span style="color:{color:permalink border}">that way</span></div>
</center>
</div>
Check this
Fiddle
<div id="arrow" style=" margin-top: -3px;">⬇</div>
You can change your transform values:
#-webkit-keyframes bounce {
0%, 20%, 60%, 100% { -webkit-transform: translateY(-5px); }
40% { -webkit-transform: translateY(-25px); }
80% { -webkit-transform: translateY(-15px); }
}
#arrow {
color:{color:permalink border};
font-size:18px;
float:left;
-webkit-animation: bounce 2s infinite ease-in-out;
}
#-webkit-keyframes bounce {
0%, 20%, 60%, 100% { -webkit-transform: translateY(-5px); }
40% { -webkit-transform: translateY(-25px); }
80% { -webkit-transform: translateY(-15px); }
}
#blogtitle{
position:relative;
height:auto;
z-index:5;
text-transform:uppercase;
color:{color:blog title};
font-size:150px;
letter-spacing:2px;
font-weight:bold;
text-align:left;
width:250px;
padding-top: 10px;
padding-left: 10px;
}
<div id="blogtitle">
<center>
<div id="arrow">⬇</div>
<div style="font-size:18px">Now go <span style="color:{color:permalink border}">that way</span></div>
</center>
</div>

Customisable Progress Bar in Html/CSS

I want to create a progress bar like below, using HTML and CSS. Getting no idea as to how to do it. Any help?
Best I could find...
<style type="text/css">
#layer1 { -moz-animation-delay:0.5s; -webkit-animation-delay:0.5s; }
#layer2 { -moz-animation-delay:1s; -webkit-animation-delay:1s; }
#layer3 { -moz-animation-delay:1.5s; -webkit-animation-delay:1.5s; }
#layer4 { -moz-animation-delay:2s; -webkit-animation-delay:2s; }
#layer5 { -moz-animation-delay:2.5s; -webkit-animation-delay:2.5s; }
#layer7 { -moz-animation-delay:1.5s; -webkit-animation-delay:1.5s; }
#layer8 { -moz-animation-delay:2s; -webkit-animation-delay:2s; }
#layer9 { -moz-animation-delay:2.5s; -webkit-animation-delay:2.5s; }
#layer10 { -moz-animation-delay:3s; -webkit-animation-delay:3s; }
#layer11 { -moz-animation-delay:3.5s; -webkit-animation-delay:3.5s; }
#-moz-keyframes loading {
0%{-moz-transform:scale(0,0);}
100%{-moz-transform:scale(1,1);}
}
#-webkit-keyframes loading {
0%{-webkit-transform:scale(0,0);}
100%{-webkit-transform:scale(1,1);}
}
#-moz-keyframes pulse {
0% {-moz-transform: scale(0);opacity: 0;}
10% {-moz-transform: scale(1);opacity: 0.5;}
50% {-moz-transform: scale(1.75);opacity: 0;}
100% {-moz-transform: scale(0);opacity: 0;}
}
#-webkit-keyframes pulse {
0% {-webkit-transform: scale(0);opacity: 0;}
10% {-webkit-transform: scale(1);opacity: 0.5;}
50% {-webkit-transform: scale(1.75);opacity: 0;}
100% {-webkit-transform: scale(0);opacity: 0;}
}
/* Loader Bar */
ul#loadbar {
list-style:none;
width:140px;
margin:0 auto;
padding-top:50px;
padding-bottom:75px;
margin-left: 530px;
}
ul#loadbar li {
float:left;
position:relative;
width:11px;
height:26px;
margin-left:1px;
border-left:1px solid #111; border-top:1px solid #111; border-right:1px solid #333; border-bottom:1px solid #333;
background:#000;
}
ul#loadbar li:first-child { margin-left:0; }
.ins .bar {
background-color:#2187e7;
background-image: -moz-linear-gradient(45deg, #7ec0ee 25%, #a0eaff);
background-image: -webkit-linear-gradient(45deg, #7ec0ee 25%, #a0eaff);
width:11px;
height:26px;
opacity:0;
-webkit-animation:fill .5s linear forwards;
-moz-animation:fill .5s linear forwards;
}
#layerFill1 { -moz-animation-delay:0.5s; -webkit-animation-delay:0.5s; }
#layerFill2 { -moz-animation-delay:1s; -webkit-animation-delay:1s; }
#layerFill3 { -moz-animation-delay:1.5s; -webkit-animation-delay:1.5s; }
#layerFill4 { -moz-animation-delay:2s; -webkit-animation-delay:2s; }
#layerFill5 { -moz-animation-delay:2.5s; -webkit-animation-delay:2.5s; }
#layerFill6 { -moz-animation-delay:3s; -webkit-animation-delay:3s; }
#layerFill7 { -moz-animation-delay:3.5s; -webkit-animation-delay:3.5s; }
#layerFill8 { -moz-animation-delay:4s; -webkit-animation-delay:4s; }
#layerFill9 { -moz-animation-delay:4.5s; -webkit-animation-delay:4.5s; }
#layerFill10 { -moz-animation-delay:5s; -webkit-animation-delay:5s; }
#-moz-keyframes fill {
0%{ opacity:0; }
100%{ opacity:1; }
}
#-webkit-keyframes fill {
0%{ opacity:0; }
100%{ opacity:1; }
}
/* Trigger button for javascript */
.trigger, .triggerFull, .triggerBar {
background: #000000;
background: -moz-linear-gradient(top, #161616 0%, #000000 100%);
background: -webkit-linear-gradient(top, #161616 0%,#000000 100%);
border-left:1px solid #111; border-top:1px solid #111; border-right:1px solid #333; border-bottom:1px solid #333;
font-family: Verdana, Geneva, sans-serif;
font-size: 0.8em;
text-decoration: none;
text-transform: lowercase;
text-align: center;
color: #fff;
padding: 10px;
border-radius: 3px;
display: block;
margin: 0 auto;
width: 140px;
}
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js" type="text/javascript"></script>
<script>
$(document).ready(function() {
$('#loadbar').removeClass('ins');
$('.triggerBar').click(function() {
$('#loadbar').removeClass('ins').delay(10).queue(function(next){
$(this).addClass('ins');
next();
});
return false;
});
});
</script>
<div class="container">
<ul id="loadbar">
<li><div id="layerFill1" class="bar"></div></li>
<li><div id="layerFill2" class="bar"></div></li>
<li><div id="layerFill3" class="bar"></div></li>
<li><div id="layerFill4" class="bar"></div></li>
<li><div id="layerFill5" class="bar"></div></li>
<li><div id="layerFill6" class="bar"></div></li>
<li><div id="layerFill7" class="bar"></div></li>
<li><div id="layerFill8" class="bar"></div></li>
<li><div id="layerFill9" class="bar"></div></li>
<li><div id="layerFill10" class="bar"></div></li>
</ul>
<a class="triggerBar" href="#">Start/Restart Animation</a>
</div>
You have google which would take less time to search for the answer..
https://css-tricks.com/html5-progress-element/
or
http://www.w3schools.com/w3css/w3css_progressbar.asp may help you.
.progress{
height: 50px;
margin: 15px;
font-family: 'Segoe UI',Arial,sans-serif;
font-weight: bolder;
text-shadow: 1px 1px 3px #000;
box-shadow: -2px 1px 3px #222;
}
.container-fluid{
-webkit-transform: rotateX(-90deg); /* Safari */
transform: rotate(-90deg);
}
.vtext{
-webkit-transform: rotateX(-90deg); /* Safari */
transform: rotate(90deg);
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
<div style="background-image: url('bg2.png');background-repeat:repeat;">
<div class="container-fluid">
<div class="container col-md-3">
<div class="progress">
<div class="progress-bar progress-bar-striped bg-success progress-bar-animated" style="width:50%">
<span class="vtext">50 %</span>
</div>
</div>
</div>
<div class="container col-md-3">
<div class="progress">
<div class="progress-bar progress-bar-striped bg-danger progress-bar-animated" style="width:30%">
<span class="vtext">30 %</span>
</div>
</div>
</div>
</div>
</div>

Navbar collapsing without Bootstrap

Hi I was trying to get my navigation bar to collapse on smaller screen size I am trying to do this without bootstrap any suggestions?
HTML
<html>
<head>
<title></title>
<!-- CSS STYLESHEET -->
<link rel="stylesheet" type="text/css" href="index.css">
<link href="http://fonts.googleapis.com/css?family=Montserrat|Black+Ops+One|Luckiest+Guy|Montez|Courgette|Slackey|Fontdiner+Swanky|Permanent+Marker|Aclonica|Lobster" rel='stylesheet' type='text/css'>
<!-- JavaScript's -->
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
</head>
<script type="text/javascript">
$(function() {
// note that this doens't call hide
$('#loading').delay(3000).fadeOut('slow');
});
</script>
<body>
<div id="loading">
<div id="loading-center">
<div id="loading-center-absolute">
<div id="object"></div>
</div>
</div>
</div>
<!-- Loading Section Ends -->
<div class="header">
<nav class="nav_first">
<img class="nike" src="http://s3.amazonaws.com/nikeinc/assets/7366/Nike_Swoosh_Logo_White_original.jpg?1328660973">
<ul>
<li class="wiggle" class="wiggle" class="wiggle" class="wiggle">Home</li>
<li class="wiggle" class="wiggle" class="wiggle">About Us</li>
<li class="wiggle" class="wiggle">Shop</li>
<li class="wiggle">Contact</li>
</ul>
</nav>
</div>
<div class="wrapper">
<div>
<h1 id="nike_text">Nike</h1>
</div>
</div>
</body>
</html>
CSS
body {
width: auto;
height: auto;
font-size:14px;
margin:0;
background-color:black;
}
#loading {
display:none;
background-color: #bd4932;
height: 100%;
width: 100%;
position: fixed;
z-index: 1;
margin-top: 0px;
top: 0px;
}
#loading-center{
width: 100%;
height: 100%;
position: relative;
}
#loading-center-absolute {
position: absolute;
left: 50%;
top: 50%;
height: 200px;
width: 200px;
margin-top: -100px;
margin-left: -100px;
}
#object{
width: 80px;
height: 80px;
background-color: #FFF;
-webkit-animation: animate 1s infinite ease-in-out;
animation: animate 1s infinite ease-in-out;
margin-right: auto;
margin-left: auto;
margin-top: 60px;
}
#-webkit-keyframes animate {
0% { -webkit-transform: perspective(160px); }
50% { -webkit-transform: perspective(160px) rotateY(-180deg); }
100% { -webkit-transform: perspective(160px) rotateY(-180deg) rotateX(-180deg); }
}
#keyframes animate {
0% {
transform: perspective(160px) rotateX(0deg) rotateY(0deg);
-webkit-transform: perspective(160px) rotateX(0deg) rotateY(0deg);
} 50% {
transform: perspective(160px) rotateX(-180deg) rotateY(0deg);
-webkit-transform: perspective(160px) rotateX(-180deg) rotateY(0deg) ;
} 100% {
transform: perspective(160px) rotateX(-180deg) rotateY(-180deg);
-webkit-transform: perspective(160px) rotateX(-180deg) rotateY(-180deg);
}
}
/* SASU - Navigation Bar */
.nav_first{
overflow:none;
list-style-type:none;
margin:0;
padding:0;
text-align:center;
}
.nav_first li{
display:inline;
}
.nav_first a{
margin-top:25px;
font-size: 30px;
letter-spacing: 3px;
font-weight:900;
margin-left:40px;
margin-right:40px;
font-family: 'Montserrat';
text-decoration: none;
display:inline-block;
padding:10px;
}
.nav_first a:hover {
color:white;
font-size:35px;
}
#-webkit-keyframes wiggle {
0% {
-webkit-transform:rotate(4deg);
}
50% {
-webkit-transform:rotate(-4deg);
}
100% {
-webkit-transform:rotate(4deg);
}
}
.wiggle:hover {
-webkit-animation: wiggle 0.5s infinite;
}
.active {background-color:orangered;}
img{
float:left;
margin:0 auto;
padding:0 auto;
}
/* Middle Section */
.nike {
display: block;
margin:auto;
height:115px;
}
#nike_text {
font-family:'Montez';
font-size:80px;
text-align: center;
color:white;
margin:auto;
letter-spacing: 2px;
}

Responsive Hexagon grid with a border

http://codepen.io/web-tiki/pen/HhCyd
I am working using the above pen from a similar question. I was able to edit the size of the hexagon editing the width property and padding but I wanted to add a border to the hexagon, I was able to the left and right of the hexagon by adding a border and editing the box-sizing of the category li div element but was not able to get it for the other sides of the hexagon by editing the category li element.
body{
font-family: 'Open Sans', arial, sans-serif;
background:rgb(0, 0, 0);
}
*{
margin:0;
padding:0;
}
#categories{
overflow:hidden;
width:90%;
margin:0 auto;
}
.clr:after{
content:"";
display:block;
clear:both;
}
#categories li{
position:relative;
border-style: solid;
border-width:10px;
list-style-type:none;
width:27.85714285714286%; /* = (100-2.5) / 3.5 */
padding-bottom: 32.16760145166612%; /* = width /0.866 */
float:left;
overflow:hidden;
visibility:hidden;
-webkit-transform: rotate(-60deg) skewY(30deg);
-ms-transform: rotate(-60deg) skewY(30deg);
transform: rotate(-60deg) skewY(30deg);
}
#categories li:nth-child(3n+2){
margin:0 1%;
}
#categories li:nth-child(6n+4){
margin-left:0.5%;
}
#categories li:nth-child(6n+4), #categories li:nth-child(6n+5), #categories li:nth-child(6n+6) {
margin-top: -6.9285714285%;
margin-bottom: -6.9285714285%;
-webkit-transform: translateX(50%) rotate(-60deg) skewY(30deg);
-ms-transform: translateX(50%) rotate(-60deg) skewY(30deg);
transform: translateX(50%) rotate(-60deg) skewY(30deg);
}
#categories li:nth-child(6n+4):last-child, #categories li:nth-child(6n+5):last-child, #categories li:nth-child(6n+6):last-child{
margin-bottom:0%;
}
#categories li *{
position:absolute;
visibility:visible;
}
#categories li > div{
border-style: solid;
border-width: 5px;
box-sizing:border-box;
width:100%;
height:100%;
text-align:center;
color:#fff;
overflow:hidden;
-webkit-transform: skewY(-30deg) rotate(60deg);
-ms-transform: skewY(-30deg) rotate(60deg);
transform: skewY(-30deg) rotate(60deg);
-webkit-backface-visibility:hidden;
}
/* HEX CONTENT */
#categories li img{
left:-100%; right:-100%;
width: auto; height:100%;
margin:0 auto;
}
#categories div h1, #categories div p{
width:90%;
padding:0 5%;
background-color:#008080; background-color: rgba(0, 128, 128, 0.8);
font-family: 'Raleway', sans-serif;
-webkit-transition: top .2s ease-out, bottom .2s ease-out, .2s padding .2s ease-out;
-ms-transition: top .2s ease-out, bottom .2s ease-out, .2s padding .2s ease-out;
transition: top .2s ease-out, bottom .2s ease-out, .2s padding .2s ease-out;
}
#categories li h1{
bottom:110%;
font-style:italic;
font-weight:normal;
font-size:1.5em;
padding-top:100%;
padding-bottom:100%;
}
#categories li h1:after{
content:'';
display:block;
position:absolute;
bottom:-1px; left:45%;
width:10%;
text-align:center;
z-index:1;
border-bottom:2px solid #fff;
}
#categories li p{
padding-top:50%;
top:110%;
padding-bottom:50%;
}
/* HOVER EFFECT */
#categories li div:hover h1 {
bottom:50%;
padding-bottom:10%;
}
#categories li div:hover p{
top:50%;
padding-top:10%;
}
This worked pretty well for me, hope it will be helpful for you as well.
<div class="hexagon"></div>
.hexagon {
position: relative;
width: 300px;
height: 173.21px;
background-color: #64C7CC;
margin: 86.60px 0;
border-left: solid 5px #333333;
border-right: solid 5px #333333;
}
.hexagon:before,
.hexagon:after {
content: "";
position: absolute;
z-index: 1;
width: 212.13px;
height: 212.13px;
-webkit-transform: scaleY(0.5774) rotate(-45deg);
-ms-transform: scaleY(0.5774) rotate(-45deg);
transform: scaleY(0.5774) rotate(-45deg);
background-color: inherit;
left: 38.9340px;
}
.hexagon:before {
top: -106.0660px;
border-top: solid 7.0711px #333333;
border-right: solid 7.0711px #333333;
}
.hexagon:after {
bottom: -106.0660px;
border-bottom: solid 7.0711px #333333;
border-left: solid 7.0711px #333333;
}
For image inside hexagon use this:
<div class="hexagon">
<div class="hexTop"></div>
<div class="hexBottom"></div>
</div>
.hexagon {
position: relative;
width: 300px;
height: 173.21px;
margin: 86.60px 0;
background-image: url(http://you_image_url.jpg);
background-size: auto 334.8632px;
background-position: center;
border-left: solid 5px #333333;
border-right: solid 5px #333333;
}
.hexTop,
.hexBottom {
position: absolute;
z-index: 1;
width: 212.13px;
height: 212.13px;
overflow: hidden;
-webkit-transform: scaleY(0.5774) rotate(-45deg);
-ms-transform: scaleY(0.5774) rotate(-45deg);
transform: scaleY(0.5774) rotate(-45deg);
background: inherit;
left: 38.93px;
}
/*counter transform the bg image on the caps*/
.hexTop:after,
.hexBottom:after {
content: "";
position: absolute;
width: 290.0000px;
height: 167.4315780649915px;
-webkit-transform: rotate(45deg) scaleY(1.7321) translateY(-83.7158px);
-ms-transform: rotate(45deg) scaleY(1.7321) translateY(-83.7158px);
transform: rotate(45deg) scaleY(1.7321) translateY(-83.7158px);
-webkit-transform-origin: 0 0;
-ms-transform-origin: 0 0;
transform-origin: 0 0;
background: inherit;
}
.hexTop {
top: -106.0660px;
border-top: solid 7.0711px #333333;
border-right: solid 7.0711px #333333;
}
.hexTop:after {
background-position: center top;
}
.hexBottom {
bottom: -106.0660px;
border-bottom: solid 7.0711px #333333;
border-left: solid 7.0711px #333333;
}
.hexBottom:after {
background-position: center bottom;
}
.hexagon:after {
content: "";
position: absolute;
top: 2.8868px;
left: 0;
width: 290.0000px;
height: 167.4316px;
z-index: 2;
background: inherit;
}

Scissor effect in mootools

I am trying to create a scissor effect in mootools, till now I have been able to achieve half of the effect.
index.html
window.addEvent('domready', function() {
events = [{transform: ['rotate(0deg) scale(1, 0) skew(0, 3deg) translate(100px, 50px)', 'rotate(180deg) scale(1.5, 4) skew(0, 3deg) translate(20px, 3px)']},
{transform: 'rotate(90deg) scale(1, 1) skew(0,0) translate(100, 100)'},
{transform: 'rotate(-10deg)'},
{transform: 'rotate(0)'},
{transform: 'rotate(90deg) scale(1, 1) skew(0,0) translate(100, 100)'},
{transform: 'rotate(10deg)'},
{transform: 'rotate(0deg)'}
];
$('triangle').addEvent('mouseenter', function(){
document.getElements('.down-triangle').each(function (el) {
el.set('tween', {duration: 1000, link: 'chain'}).addEvent('domready', function () {
this.get('tween').cancel().
start('transform', 'rotate(0)', events[2].transform).
start('transform', events[3].transform).s
})
})
document.getElements('.up-triangle').each(function (el) {
el.set('tween', {duration: 1000, link: 'chain' }).addEvent('domready', function () {
this.get('tween').cancel().
start('transform', 'rotate(0)', events[5].transform).
start('transform', events[6].transform).s
})
})
});
});
</script>
</head>
<body>
<div id="up">
<div id="bluebox" class="bluebox">
<div class="noshow">
<p>Need a website? </p>
</div>
</div>
</div>
<div id="bluebox1" class="bluebox1">
</div>
<div id="triangle" style="position:fixed;" >
<div id="up-triangle" class="up-triangle"></div>
<div id="down-triangle" class="down-triangle"></div>
</div>
</body>
style.css
#bluebox {
height:200px;
width:200px;
border:12px solid #000;
border-radius:500px;
margin-top:100px;
margin-left:800px;
-webkit-transition: -webkit-transform 550ms;
-moz-transition:-moz-transform 550ms;
transition: transform 550ms;
cursor:pointer;
}
.noshow{display: none; color:#fff;}
#bluebox:hover{
height:200px;
width:200px;
background:black;
-webkit-transform: scale(1.4);
-moz-transition:scale(1.4);
transform: scale(1.4);
z-index:20;
}
#bluebox:hover .noshow{display:inline;}
#bluebox1 {
height:200px;
width:200px;
border:12px solid #000;
border-radius:500px;
margin-top:0px;
margin-left:800px;
-webkit-transition: -webkit-transform 550ms;
-moz-transition:-moz-transform 550ms;
transition: transform 550ms;
cursor:pointer;
}
#bluebox1:hover{
height:200px;
width:200px;
background:#000;
-webkit-transform: scale(1.4);
-moz-transition:scale(1.4);
transform: scale(1.4);
}
#triangle{
width: 1px;
height: 1px;
}
#up-triangle {
width: 0px;
height: 0px;
border-bottom: 120px solid black;
border-left: 300px solid transparent;
border-right: 300px solid transparent;
margin-top:-345px;
margin-left:300px;
cursor:pointer;
}
#down-triangle {
width: 0;
height: 0;
border-top: 120px solid black;
border-left: 300px solid transparent;
border-right: 300px solid transparent;
margin-left:300px;
margin-top:2px;cursor:pointer;
}
The effect achieved is both the triangles moving up and down. But I want to make the circle move up and down along with the triangle.
I'd like to achieve that effect. How can I do that?