简体   繁体   中英

How can I show an horizontal list after clicking a link?

I'd like to get something like the "share" link in the lower right corner. https://www.celine.com/en

I tried many times using CSS only but I don't know javascript/jquery so I can't do so much actually.

Thank you in advance!

<a href="#" class="share"> Share </a>

<div class="share-cont">
  <!--List of social media buttons here-->
</div>

Initially hide the whole row by giving

.share-cont {
  position: absolute;
  right: -300px;
}

Then on click of share button, position it to 0px

$('.share').on('click', function() {
  $(".share-cont").animate({'right': '0px'}, 'slow');
});

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM