Vielen Dank im Voraus, ich versuche klebrige Bilder hintereinander, wie in der folgenden Abbildung gezeigt, aber ich bekomme das Ergebnis als eines unter dem anderen. Die zuletzt hinzugefügte Haftnotiz sollte oben sein, alle anderen Notizen sollen hinter den neuesten stehen. Jede Hilfe wäre zu erwarten.Hinzufügen von Haftnotizen hintereinander
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<style>
.pink{
\t background:#f05f9d;
\t border:1px solid #f05f9d;
\t color:#fff;
\t font-weight:600;
}
.pink:hover{
\t background:#f05f9d;
\t border:1px solid #f05f9d;
\t color:#fff;
\t font-weight:600;
}
.pink-button{
\t padding: 10px 11px;
\t border-radius: 14px;
\t font-weight: 600;
\t font-size: 16px;
}
.sticky {
\t margin: 0;
\t padding: 8px 24px;
\t width:200px;
\t height:200px;
\t font-size: 1.4em;
\t border:1px #E8Ds47 solid;
\t -moz-box-shadow:0px 0px 6px 1px #333333;
\t -webkit-box-shadow:0px 0px 6px 1px #333333;
\t box-shadow:0px 0px 6px 1px #333333;
\t background: #fefdca;
\t background: -moz-linear-gradient(top, #fefdca 0%, #f7f381 100%);
\t background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fefdca), color-stop(100%,#f7f381));
\t background: -webkit-linear-gradient(top, #fefdca 0%,#f7f381 100%);
\t background: -o-linear-gradient(top, #fefdca 0%,#f7f381 100%);
\t background: -ms-linear-gradient(top, #fefdca 0%,#f7f381 100%);
\t filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fefdca', endColorstr='#f7f381',GradientType=0);
\t background: linear-gradient(top, #fefdca 0%,#f7f381 100%);
}
.sticky p {
\t text-align: center;
}
.sticky textarea {
\t width:160px;
\t height:170px;
\t background: #fefdca;
\t background: -moz-linear-gradient(top, #fefdca 0%, #f7f381 100%);
\t background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fefdca), color-stop(100%,#f7f381));
\t background: -webkit-linear-gradient(top, #fefdca 0%,#f7f381 100%);
\t background: -o-linear-gradient(top, #fefdca 0%,#f7f381 100%);
\t background: -ms-linear-gradient(top, #fefdca 0%,#f7f381 100%);
\t filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fefdca', endColorstr='#f7f381',GradientType=0);
\t background: linear-gradient(top, #fefdca 0%,#f7f381 100%);
\t border-bottom:none !important;
}
.sticky ol {
\t margin: 12px;
}
</style>
</head>
<body>
<div class="sticky">
<textarea placeholder="Type the problem here..."></textarea> \t \t \t \t
</div><br/> \t \t
<div id="spin_btn_div">
<div class="btn-container" style="margin-bottom:0px;position:absolute;margin-left:40px;">
<a class="btn pink pink-button shooter-btn" id="addProblem">Add problem</a>
\t </div>
</div>
</body>
<script>
$('#addProblem').click(function(){
\t $('.sticky').after('<div class="sticky"><textarea placeholder="Type the problem here..."></textarea><br></div>');
});
</script>
</html>
Versuchen Sie, '.sticky' als' position: absolute; 'zu setzen, dann' position: relative; 'auf ihren Eltern, danach mit ihren' z-index' und 'left/right' Eigenschaften. – Krusader
Probieren Sie diese https://jsfiddle.net/x7cqphq9/ – Krusader
Hmm, perfekt ..., Aber es ist wie eins über dem anderen hinzufügen, ich versuche, wie eins nach dem anderen wie oben in Bild zu bekommen ...! –