• uni-app scroll-view横向滚动(原创+图文)


    废话不多说,先上效果图,再上源码!!!!

    1.效果图

    2.源码

    <template>
    	<view class="content">
    		<scroll-view scroll-x="true" class="scroll">
    			<view class="box">
    				<image src="http://b-ssl.duitang.com/uploads/item/201703/01/20170301163305_sCd8j.gif" class="images"></image>
    				<view>作品 123445</view>
    				<view>联系电话 134****4152</view>
    			</view>
    			<view class="box">
    				<image src="http://b-ssl.duitang.com/uploads/item/201703/01/20170301163305_sCd8j.gif" class="images"></image>
    				<view>作品 123445</view>
    				<view>联系电话 134****4152</view>
    			</view>
    			<view class="box">
    				<image src="http://b-ssl.duitang.com/uploads/item/201703/01/20170301163305_sCd8j.gif" class="images"></image>
    				<view>作品 123445</view>
    				<view>联系电话 134****4152</view>
    			</view>
    			<view class="box">
    				<image src="http://b-ssl.duitang.com/uploads/item/201703/01/20170301163305_sCd8j.gif" class="images"></image>
    				<view>作品 123445</view>
    				<view>联系电话 134****4152</view>
    			</view>
    			<view class="box">
    				<image src="http://b-ssl.duitang.com/uploads/item/201703/01/20170301163305_sCd8j.gif" class="images"></image>
    				<view>作品 123445</view>
    				<view>联系电话 134****4152</view>
    			</view>
    			<view class="box">
    				<image src="http://b-ssl.duitang.com/uploads/item/201703/01/20170301163305_sCd8j.gif" class="images"></image>
    				<view>作品 123445</view>
    				<view>联系电话 134****4152</view>
    			</view>
    		</scroll-view>
    	</view>
    </template>
    
    
    <script>
    	export default {
    		data() {
    			return {
    
    			}
    		},
    		methods: {
    
    		}
    	}
    </script>
    
    <style scoped>
    	.content {
    		padding: 0 30upx;
    	}
    
    	.scroll {
    		 100%;
    		overflow: hidden;
    		white-space: nowrap;
    	}
    
    	.box {
    		display: inline-block;
    		 520upx;
    		height: 600upx;
    		background: #0062CC;
    		margin-right: 30upx;
    	}
    
    	.box:last-child {
    		margin-right: 0;
    	}
    
    	.images {
    		 520upx;
    		height: 360upx;
    		border-radius: 16upx;
    	}
    </style>
    

      

  • 相关阅读:
    MySQL的语句执行顺序
    mysql 基本使用
    spring 事务详解
    java 设计模式
    hibernate 简单查询
    qwq(一些有趣的数学题)
    关于libra9z
    HDU6756 Finding a MEX
    CF1386C Joker
    CF1340F Nastya and CBS
  • 原文地址:https://www.cnblogs.com/fanqiuzhuji/p/12129382.html
Copyright © 2020-2023  润新知