訪問いただきありがとうございます。 私の背中合わせのボタンに「テキスト」と言って「」と言っているようなものを追加するにはどうすればいいですか?方法:戻るトップボタンにテキストを追加
jQuery(document).ready(function($){
\t // browser window scroll (in pixels) after which the "back to top" link is shown
\t var offset = 300,
\t \t //browser window scroll (in pixels) after which the "back to top" link opacity is reduced
\t \t offset_opacity = 1200,
\t \t //duration of the top scrolling animation (in ms)
\t \t scroll_top_duration = 700,
\t \t //grab the "back to top" link
\t \t $back_to_top = $('.cd-top');
\t //hide or show the "back to top" link
\t $(window).scroll(function(){
\t \t ($(this).scrollTop() > offset) ? $back_to_top.addClass('cd-is-visible') : $back_to_top.removeClass('cd-is-visible cd-fade-out');
\t \t if($(this).scrollTop() > offset_opacity) {
\t \t \t $back_to_top.addClass('cd-fade-out');
\t \t }
\t });
\t //smooth scroll to top
\t $back_to_top.on('click', function(event){
\t \t event.preventDefault();
\t \t $('body,html').animate({
\t \t \t scrollTop: 0 ,
\t \t \t }, scroll_top_duration
\t \t);
\t });
});
body {
width:100%;
height:1200px;
background-color:#242424;
margin:0;
padding:0;
}
body > div {
width:100%;
height:75px;
background-color:#393939;
text-align:center;
position:fixed;
}
.text {
font-size:40px;
color:white;
line-height:75px;
}
.cd-container {
width: 90%;
max-width: 768px;
margin: 2em auto;
}
.cd-container::after {
content: '';
display: table;
clear: both;
}
.cd-top {
display: inline-block;
height: 40px;
width: 80px;
position: fixed;
bottom: 40px;
right: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
overflow: hidden;
text-indent: 100%;
white-space: nowrap;
background: rgba(231, 142, 46, 0.8) url(https://codyhouse.co/demo/back-to-top/img/cd-top-arrow.svg) no-repeat center 50%;
visibility: hidden;
opacity: 0;
-webkit-transition: opacity .3s 0s, visibility 0s .3s;
-moz-transition: opacity .3s 0s, visibility 0s .3s;
transition: opacity .3s 0s, visibility 0s .3s;
}
.cd-top.cd-is-visible, .cd-top.cd-fade-out, .no-touch .cd-top:hover {
-webkit-transition: opacity .3s 0s, visibility 0s 0s;
-moz-transition: opacity .3s 0s, visibility 0s 0s;
transition: opacity .3s 0s, visibility 0s 0s;
}
.cd-top.cd-is-visible {
visibility: visible;
opacity: 1;
}
.cd-top.cd-fade-out {
opacity: .5;
}
.no-touch .cd-top:hover {
color:#1769ff;
opacity: 1;
}
@media only screen and (min-width: 768px) {
.cd-top {
right: 20px;
bottom: 20px;
}
}
}
@media only screen and (min-width: 1024px) {
.cd-top {
height: 60px;
width: 60px;
right: 30px;
bottom: 30px;
}
}
<!doctype html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
</head>
<body>
<div>
<span class="text"> Scrolldown.</span>
</div>
<a href="#0" class="cd-top">BackToToP</a>
<!-- Im using Back to Top from here:
https://codyhouse.co/demo/back-to-top/index.html
-->
</body>
</html>
私はいろいろな方法で試しましたが、どうやっていいのか分かりません。おかげさまで
皆さんにすべての作業を依頼していません。私はちょうど作業を続けるためにガイドやリトルクラムが必要です。 – Juan