weex页面上划动,固定header
注:请在手机上扫描预览效果(支持ios、android)
<template>
<scroller>
<header class="search">
<text class="text">sdasxxxxxxxx</text>
</header>
<list>
<template v-for="(index, i) in lists">
<header :key="`${index}-header`" v-if="i%2===0 && i != 0">
<text class="banner">{{index}} HEADER</text>
</header>
<cell :key="index">
<div class="panel">
<text class="text">{{index}}</text>
</div>
</cell>
</template>
</list>
</scroller>
</template>
<script>
export default {
data () {
return {
lists: [
'First', 'Second', 'Third', 'Fourth',
'Fifth', 'Sixth', 'Seventh', 'Eighth'
]
}
}
}
</script>
<style scoped>
.search{
background-color: red;
opacity: .1;
background-color: rgba(0,0,0,0.6)
}
.search .text{
background-color: rgba(0,0,0,0.6)
}
.banner {
width: 750px;
padding: 25px;
font-size: 60px;
text-align: center;
font-weight: bold;
color: #41B883;
background-color: rgb(162, 217, 192);
}
.panel {
width: 600px;
height: 300px;
margin-left: 75px;
margin-top: 35px;
margin-bottom: 35px;
flex-direction: column;
justify-content: center;
border-width: 2px;
border-style: solid;
border-color: rgb(162, 217, 192);
background-color: rgba(162, 217, 192, 0.2);
}
.text {
font-size: 50px;
text-align: center;
color: #41B883;
}
</style> 相关推荐
kentrl 2020-11-10
咻咻ing 2020-07-04
wghou 2020-06-16
zkwgpp 2020-06-14
xiechao000 2020-05-18
woniyu 2020-05-14
ysmh00 2020-05-14
0与的世界 2020-04-28
worldkun 2020-05-10
carolAnn 2020-04-20
zengni 2020-02-29
hygbuaa 2020-02-26
zhaolisha 2020-02-24
server { listen 80; server_name ××××.com; access_log /×××/×××/nginx/log/access.log; error_log /×××/×
咻咻ing 2020-02-02
JF0 2020-01-31
OwenJi 2020-01-17
webfullStack 2020-01-10