layui carousel轮播多种效果代码
代码语言:html
所属分类:幻灯片
代码描述:layui carousel轮播多种效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Layui</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/js/layui/css/layui.css">
<!-- 注意:如果你直接复制所有代码到本地,上述css路径需要改成你本地的 -->
</head>
<body>
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
<legend>常规轮播</legend>
</fieldset>
<div class="layui-carousel" id="test1" lay-filter="test1">
<div carousel-item="">
<div>条目1</div>
<div>条目2</div>
<div>条目3</div>
<div>条目4</div>
<div>条目5</div>
</div>
</div>
<div class="layui-carousel" id="test2" style="margin-top: 15px;">
<div carousel-item="">
<div>条目1</div>
<div>条目2</div>
</div>
</div>
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
<legend>设定各种参数</legend>
</fieldset>
<div class="layui-form">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">宽高</label>
<div class="layui-input-inline" style="width: 98px;">
<input type="tel" name="width" value="600" autocomplete="off" placeholder="width" class="layui-input demoSet">
</div>
<div class="layui-input-inline" style="width: 98px;">
<input type="tel" name="height" value="280" autocomplete="off" placeholder="height" class="layui-input demoSet">
</div>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">动画类型</label>
<div class="layui-input-block">
<div class="layui-btn-group demoTest" style="margin-top: 5px;">
<button class="layui-btn layui-btn-sm" style="background-color: #5FB878;" data-type="set" data-key="anim" data-value="default">左右切换</button>
<button class="layui-btn layui-btn-sm" data-type="set" data-key="anim" data-value="updown">上下切换</button>
<button class="layui-btn layui-btn-sm" data-type="set" data-key="anim" data-value="fade">.........完整代码请登录后点击上方下载按钮下载查看
网友评论0