vrai bouton "haut de page" digne de ce nom

This commit is contained in:
Esenjin 2022-09-17 11:07:57 +02:00
parent 6dc437a603
commit e2c9666fab
3 changed files with 27 additions and 3 deletions

View File

@ -8,8 +8,23 @@
<meta property="og:description" content="Albums d'illustrations des waifus d'Esenjin."> <meta property="og:description" content="Albums d'illustrations des waifus d'Esenjin.">
<link rel="shortcut icon" id="favicon" href="favicon.ico"> <link rel="shortcut icon" id="favicon" href="favicon.ico">
<link href='style.css' rel='stylesheet' type='text/css'> <link href='style.css' rel='stylesheet' type='text/css'>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>
<script>
jQuery(function(){
$(function () {
$(window).scroll(function () {
if ($(this).scrollTop() > 200 ) {
$('#scrollUp').css('right','10px');
} else {
$('#scrollUp').removeAttr( 'style' );
}
});
});
});
</script>
</head> </head>
<body> <body>
@ -45,6 +60,8 @@ if(!empty($dossier));
} }
?> ?>
<center><a href="#">&#8632; retourer là-haut !</a></center> <div id="scrollUp">
<a href="#top"><img src="top.png"/></a>
</div>
</br> </br>
</body> </body>

View File

@ -17,7 +17,14 @@ div {
} }
img { img {
width: 600px; max-width: 600px;
height: auto; height: auto;
border-radius: 12px; border-radius: 12px;
} }
#scrollUp {
position: fixed;
bottom : 10px;
right: -100px;
opacity: 0.5;
}

BIN
top.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB