问题描述
当我向右滚动一行时,我的位置出现了问题。代码:https://codepen.io/olastanislawska/pen/GRqooyG(移动视图)。向右滚动第一行,并在第一行和第二行中突出显示电影课。首先,我不知道该怎么解决。
--
/*
html5doctor.com Reset Stylesheet
v1.6.1
Last Updated: 2010-09-17
Author: Richard Clark - http://richclarkdesign.com
Twitter: @rich_clark
*/
html,body,div,span,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,abbr,address,cite,code,del,dfn,em,img,ins,kbd,q,samp,small,strong,sub,sup,var,b,i,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,figcaption,figure,footer,header,hgroup,menu,nav,section,summary,time,mark,audio,video {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-size: 100%;
vertical-align: baseline;
background: transparent;
}
body {
line-height: 1;
}
article,section {
display: block;
}
ul {
list-style: none;
}
blockquote,q {
quotes: none;
}
blockquote:before,blockquote:after,q:before,q:after {
content: '';
content: none;
}
a {
margin: 0;
padding: 0;
font-size: 100%;
vertical-align: baseline;
background: transparent;
}
/* change colours to suit your needs */
ins {
background-color: #ff9;
color: #000;
text-decoration: none;
}
/* change colours to suit your needs */
mark {
background-color: #ff9;
color: #000;
font-style: italic;
font-weight: bold;
}
del {
text-decoration: line-through;
}
abbr[title],dfn[title] {
border-bottom: 1px dotted;
cursor: help;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
/* change border colour to suit your needs */
hr {
display: block;
height: 1px;
border: 0;
border-top: 1px solid #cccccc;
margin: 1em 0;
padding: 0;
}
input,select {
vertical-align: middle;
}
#app {
height: 100%;
position: relative;
font-family: Arial,Helvetica,sans-serif;
overflow: hidden;
}
#app::after {
content: '';
top: 0%;
right: 0%;
bottom: 0%;
left: 0%;
z-index: -1000;
background-image: url(../../markus-spiske-QmEF-d1HQVI-unsplash.jpg);
background-position: center;
background-repeat: no-repeat;
background-size: cover;
position: fixed;
-webkit-filter: blur(10px);
filter: blur(10px);
}
#movies .categories {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
padding: 15;
}
#movies .categories .category {
position: relative;
margin: 15px;
}
#movies .categories .category .movies {
overflow-x: auto;
white-space: nowrap;
width: 100%;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
}
#movies .categories .category .movies .movie {
min-width: 90%;
-webkit-box-flex: 0;
-ms-flex: 0 0 auto;
flex: 0 0 auto;
margin: 5%;
position: relative;
text-align: center;
overflow-y: hidden;
-webkit-box-sizing: content-box;
box-sizing: content-box;
}
@media (min-width: 350px) {
#movies .categories .category .movies .movie {
min-width: calc(50%);
}
}
#movies .categories .category .movies .movie.active {
color: #fff;
}
#movies .categories .category .movies .movie.active .image::after {
content: '';
top: 0%;
right: 0%;
bottom: 0%;
left: 0%;
background-color: rgba(54,54,0.75);
position: absolute;
border: 2px solid deeppink;
}
#movies .categories .category .movies .movie.active .title {
position: absolute;
top: 5%;
width: 100%;
}
#movies .categories .category .movies .movie.active .content {
position: absolute;
bottom: 5%;
width: 100%;
}
#movies .categories .category .movies .movie.active .content button {
background-color: deeppink;
border: none;
border-radius: 4px;
margin: 10px 0;
padding: 5px 10px;
text-transform: uppercase;
-webkit-box-shadow: 0 0 15px rgba(0,0.5);
box-shadow: 0 0 15px rgba(0,0.5);
cursor: pointer;
}
#movies .categories .category .movies .movie .image {
width: 100%;
height: 200px;
background: red;
}
#movies .categories .category .movies .movie .title {
position: absolute;
top: -100%;
width: 100%;
}
#movies .categories .category .movies .movie .content {
position: absolute;
bottom: -100%;
width: 100%;
}
.slider-btns {
position: absolute;
right: 15px;
}
.slider-btns i {
font-size: 22px;
cursor: pointer;
}
#navigation {
padding: 15px 0;
margin: 0 10px;
overflow-x: scroll;
}
#navigation ul.nav {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
font-size: 16px;
}
#navigation ul.nav li {
padding: 5px 15px;
}
#navigation ul.nav li.active {
background-color: deeppink;
border-radius: 25px;
font-weight: bold;
-webkit-box-shadow: 0 0 15px rgba(255,255,0.5);
box-shadow: 0 0 15px rgba(255,0.5);
margin-left: 5px;
}
#slider {
width: 100vw;
height: 75vh;
margin: 0 auto;
position: relative;
z-index: 1000;
}
#slider::before {
content: '';
top: 0%;
right: 0%;
bottom: 0%;
left: 0%;
position: absolute;
background: black;
background: -webkit-gradient(linear,left bottom,left top,from(black),color-stop(25%,rgba(0,0.8)),to(rgba(0,0)));
background: linear-gradient(0deg,black 0%,0.8) 25%,0) 100%);
}
#slider .logo {
padding: 15px;
position: absolute;
font-family: 'Dancing Script',cursive;
font-size: 30px;
color: #fff;
text-shadow: 0 0 10px deeppink;
}
#slider .image {
height: 100%;
background-image: url(../../markus-spiske-QmEF-d1HQVI-unsplash.jpg);
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
#slider .content {
position: absolute;
bottom: 10%;
right: 5%;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
-webkit-box-align: end;
-ms-flex-align: end;
align-items: flex-end;
}
#slider .content .title {
width: 100%;
}
#slider .content .title h3 {
text-align: center;
color: deeppink;
min-width: 100px;
padding: 5px;
border-radius: 10px;
font-size: 18px;
margin: 10px 0;
}
#slider .content .description {
max-width: 100%;
position: relative;
overflow-wrap: break-word;
}
#slider .content .description p {
text-align: center;
color: #fff;
font-size: 14px;
background: -webkit-linear-gradient(#eee,#333);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
-webkit-text-fill-color: transparent;
}
#slider .content button {
background-color: deeppink;
border: none;
border-radius: 4px;
margin: 10px 0;
padding: 5px 10px;
text-transform: uppercase;
-webkit-box-shadow: 0 0 10px rgba(0,0.5);
box-shadow: 0 0 10px rgba(0,0.5);
cursor: pointer;
-webkit-box-shadow: 0 0 15px rgba(255,0.25);
box-shadow: 0 0 15px rgba(255,0.25);
}
/*# sourceMappingURL=main.css.map */
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)