Um dies zu tun, muss ich Code mit dem HTML-Code der Anzeige zusammenführen, Image..is gibt es einen Weg oder einen Code für eine Teil des Bildschirms behoben (der durch Scrollen unbeeinflusst bleibt) unabhängig davon, welches Element sich in diesem Bereich befindet.Code für ein Bild zu halten, Anzeige an einer Stelle auf dem Bildschirm
-3
A
Antwort
0
Sie können wie durch die Zuordnung Position Stil in Ihrer CSS-Datei fixiertes Bild und Anzeigenteil tun:
img {position:fixed;}
0
Sie sollten bei Layouten mit CSS einen Blick darauf werfen. Genauer gesagt die position
Eigenschaft. In Ihrem Fall könnten Sie eine CSS-Klasse wie folgt definieren und zuweisen zu Ihrem Element:
.makeMeFix {
position:fixed,
bottom: 0px,
left: 0px,
width: 30px,
height: 30px
}
Dies würde ein Element verursachen der Größe sein 30x30px, dass in der unteren linken Ecke befestigt ist. http://www.w3schools.com/css/css_positioning.asp
0
In Position fixiert und seine Position ändern CSS oben mit, links, rechts oder unten
.img-container {
position: fixed;
top: 0;
width: 100%;
height: 50px;
background-color: black;
}
<div class="img-container">
<!-- Put image here -->
</div>
<div class="text-content-container">
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
<p>t is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).</p>
<p>Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32.</p>
<p>There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.</p>
</div>
Verwandte Themen
- 1. wie ein Optionsmenü halten immer auf dem Bildschirm
- 2. So zeigen Sie 2d Bild auf dem Bildschirm an unity3d
- 3. Anzeige Pixel auf dem Bildschirm in C
- 4. Groovy: Wie schreibe ich auf einer Zeile an der gleichen Stelle auf dem Bildschirm? (Windows)
- 5. Platziere Bild an der Stelle mit Planetary.js
- 6. JLabel zeigt kein Bild auf dem Bildschirm
- 7. Anzeige ein Bild - Last von einer Reihe
- 8. Wie stelle ich die maximale Höhe eines ImageView auf den verfügbaren Platz auf dem Bildschirm ein?
- 9. Wie halten Sie die Tastatur immer auf dem Bildschirm?
- 10. Halten Sie eine HTML-Tabellenzeile auf dem Bildschirm dauerhaft sichtbar
- 11. Anzeige von stdout auf dem Bildschirm und eine Datei gleichzeitig
- 12. XCUI Test Halten Sie den Finger auf dem Bildschirm
- 13. So zeigen Sie ein Bitmap-Bild auf dem Verifone VX 520-Bildschirm an
- 14. Bild an bestimmter Stelle des Absatzes einfügen
- 15. Zeichnen auf ein Bild vor dem Zeichnen auf dem Bildschirm in XNA mit VB.NET
- 16. Wie fügt man ein Bild auf dem gesamten Bildschirm ein, ohne die Statusleiste zu stören?
- 17. Anzeige eines Lade-Overlays auf dem Android-Bildschirm
- 18. IOS 7 Startbild, Anzeige schwarzer Bildschirm auf dem Gerät NUR
- 19. wie Bild nach dem Klicken auf das Bild über den Bildschirm zu öffnen
- 20. UIStackView tobt Stapel Artikel an einer Stelle
- 21. Wie GetMousePosition an einer beliebigen Stelle auf dem Bildschirm, außerhalb der Grenzen des Fensters (oder eines beliebigen Visual)
- 22. Bild erscheint an der falschen Stelle
- 23. Gibt es eine Möglichkeit, WCF-Serverfehler an einer Stelle auf dem Client zu behandeln?
- 24. Bild herunterladen und an anderer Stelle anhängen
- 25. Love2d bewegt ein Objekt auf dem Bildschirm
- 26. Klasse, um ein Fenster auf dem Bildschirm zu positionieren
- 27. Fehler beim Bild zu Bildschirm
- 28. Wie zeige ich einen Ort aus einer Tabelle auf einer Karte auf dem nächsten Bildschirm an?
- 29. Mit PyAutoGUI, um ein Bild auf dem Bildschirm unabhängig von der Farbe/Helligkeit zu finden
- 30. Simulieren Sie ein "Bild aufgenommen" -Bildschirm
Ich frage mich, ob es möglich ist, dies zu tun, ohne img verschmelzenden {position: behoben;} Code mit dem Bild, Anzeigencode. – harsher
Ich möchte einen SPACE fixed ... etwas, das keinen Code hat. – harsher
können Sie bitte Ihre Frage mit Code stellen, den Sie geschrieben haben !! oder im Detail erklären was genau du willst ?? Oder wenn Sie Bootstrap verwenden können, dann können Sie Klasse = "Affix" in Ihrem Fach Div hinzufügen! –