Spaces:
Sleeping
Sleeping
File size: 1,205 Bytes
138c021 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
html = """
<style>
body{
font-family: sans-serif;
}
h1{
font-weight: 100;
}
.container{
width: 100%;
display:block;
overflow:hidden;
}
.carousel{
display:block;
width: 100%;
height: 320px;
background: white;
overflow-x: scroll;
padding: 10px;
margin: 0;
white-space: nowrap;
border-top: 2px solid rgba(0, 0, 0, 0.1);
border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}
.item {
display: inline-block;
overflow: hidden;
width: 250px;
margin: 0 10px;
height: calc(100%);
background: rgba(0, 0, 0, 0.05) no-repeat center center;
background-size: cover;
position:relative;
border-radius: 20px;
box-shadow: 0 0 10px #dfdfdf;
}
.item p {
padding: 20px;
word-break: break-all;
white-space: break-spaces;
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 4;
-webkit-box-orient: vertical;
margin: 0;
align: center;
}
#image-container{
width: 100%;
height: 60%;
text-align:center;
font-size: 9em;
color: white;
overflow: hidden;
}
#image-container img{
width: 100%;
height: 100%;
object-fit: contain;
}
</style>
</head>
<body>
<div class="container">
<div class="carousel">
""" |