Jump to content

Make a scroll-down arrow clickable - Bedford

Recommended Posts

Site URL: https://www.hendrenwriting.com

I found this useful bit of CSS (below) to insert a "scroll down" icon on my banner. I managed that, but I'd like this icon be clickable -- to actually take the reader down to where the content begins (under the banner). I'm sure it's just a simple bit of code injection, but I don't know what it is. Can anyone give me the code to make that work? Many thanks.  

.banner-thumbnail-wrapper:after {
 content: "\e02d";
 display: inline-block;
 position: absolute;
 z-index: 100;
 color: #D3D3D3;
 width: 100%;
 text-align: center;
 font-family: 'squarespace-ui-font';
 transform: rotate(90deg);
 cursor: pointer;
 font-style: normal;
 -webkit-font-smoothing: antialiased;
 font-size: 32px;
 margin-top: -100px;
}

Link to comment
  • Replies 6
  • Views 946
  • Created
  • Last Reply

Add a Code Block > Paste this code. 

<div class="arrow bounce">
  <a class="fa fa-arrow-down fa-2x" href="#next-section"></a>
</div>
<style>
.arrow a {
  color: white;
  text-decoration: none;
}
.arrow {
  text-align: center;
  margin: 8% 0;
}
.bounce {
  -webkit-animation: bounce 2s infinite;
  animation: bounce 2s infinite;
}
@-webkit-keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-30px);
  }
  60% {
    transform: translateY(-15px);
  }
}
@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-30px);
  }
  60% {
    transform: translateY(-15px);
  }
}

</style>

Next, in the under current section, add a Code Block > Paste this code

<span id="next-section"></span>

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
20 hours ago, JHendren said:

Hi @tuanphan, many thanks for the reply. But as far as I can tell, I can't use your code on my banner image. Right? It seems to be for a normal code block on a page.

Do you have a bit of code that will work for the white arrow on the banner image here: www.hendrenwriting.com

You can add a text link (with anchor link) on Banner Description, then we will give the code to change text link to arrow icon.

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
18 hours ago, JHendren said:

OK. So if I use the text "scroll down" in the Banner Description, can you transform that text into a down arrow, linking it to the anchor #home-top? 

You can add link: #home-top on text link. We can give the code to change text link to down arrow

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.