Created
November 28, 2023 10:47
-
-
Save ramsesoriginal/496080628f98791036bf241199d5d5b8 to your computer and use it in GitHub Desktop.
Horizontally scrolling box
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Horizontally scrolling box | |
*/ | |
.scrollbox { | |
/*overflow: hidden;*/ | |
display: block; | |
outline: 1px solid red; | |
padding: 0; | |
margin: 0; | |
} | |
.scrollbox.horizontal { | |
width: 220px; | |
height: 340px; | |
} | |
.scrollbox.horizontal .scroller { | |
display: inline-flex; | |
padding: 0; | |
margin: 0; | |
outline: 1px solid green; | |
height: 340px; | |
} | |
.scrollbox.horizontal .scrollelement { | |
display: block; | |
outline: 1px solid blue; | |
margin: 10px; | |
height: 320px; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<aside class="scrollbox horizontal imagecontainer" id="scrollbox1"> | |
<div class="scroller"> | |
<figure class="scrollelement"> | |
<img src="https://picsum.photos/200/300" alt="Zufallsbild nummer 1" /> | |
<figcaption>Bild 1</figcaption> | |
</figure> | |
<figure class="scrollelement"> | |
<img src="https://picsum.photos/200/300" alt="Zufallsbild nummer 2" /> | |
<figcaption>Noch ein Zufallsbild</figcaption> | |
</figure> | |
<figure class="scrollelement"> | |
<img src="https://picsum.photos/200/300" alt="Zufallsbild nummer 2" /> | |
<figcaption>Noch ein Zufallsbild</figcaption> | |
</figure> </div> | |
</aside> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// alert('Hello world!'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment