Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

Scroll back to top of page on icon/image click


bonniergcuk
Go to solution Solved by tuanphan,

Question

Site URL: http://www.dolphinbottles.co.uk

Hi,image.thumb.png.081397d8ddfca065a3d690088089ad6a.png

I was hoping to know if theres any code that when you click the mini logo in the right hand corner of the page it would auto-scroll back to the top of the page?

The logo is fixed. Code is:

<div id="dolphin-logo">
<img src="https://static1.squarespace.com/static/5efca1d4b38d327351cb3a48/t/5f80623086feca1a363d3f95/1602249265109/Untitled+design+%288%29+%281%29.png" width="110" height="55">
</div>

#dolphin-logo {
position: fixed;
top: 90%;
right: 0;
left: 80%;
transform: rotate(0deg) translateX(50%);
transform-origin: 100% 0;
z-index: 99999;
}
@media screen and (max-width: 960px) {
#dolphin-logo {
bottom: 2%;
left: 40%;
top: auto;
}
}

Appreciate any help 🙂

Link to post
  • Answers 2
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

Posted Images

2 answers to this question

Recommended Posts

  • 0

edit this

<div id="dolphin-logo">
<img src="https://static1.squarespace.com/static/5efca1d4b38d327351cb3a48/t/5f80623086feca1a363d3f95/1602249265109/Untitled+design+%288%29+%281%29.png" width="110" height="55">
</div>

to this

<a id="dolphin-logo" href="#">
<img src="https://static1.squarespace.com/static/5efca1d4b38d327351cb3a48/t/5f80623086feca1a363d3f95/1602249265109/Untitled+design+%288%29+%281%29.png" width="110" height="55">
</a>

 

You can send your question to my email to get detail answer. / How to Setup Password & Share URL 

-- I came back. Will answer soon.

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...