按钮

这里写图片描述

<a href="javascript:;" class="weui_btn weui_btn_primary">按钮-确定-可用</a>
<a href="javascript:;" class="weui_btn weui_btn_disabled weui_btn_primary">按钮-确定-不可用</a>
<a href="javascript:;" class="weui_btn weui_btn_warn">按钮-警告-可用</a>
<a href="javascript:;" class="weui_btn weui_btn_disabled weui_btn_warn">按钮-警告-不可用</a>
<a href="javascript:;" class="weui_btn weui_btn_default">按钮-取消-可用</a>
<a href="javascript:;" class="weui_btn weui_btn_disabled weui_btn_default">按钮-取消-不可用</a>
<a href="javascript:;" class="weui_btn weui_btn_plain_default">按钮-镂空-取消</a>
<a href="javascript:;" class="weui_btn weui_btn_plain_primary">按钮-镂空-确定</a>
<a href="javascript:;" class="weui_btn weui_btn_mini weui_btn_primary">按钮-迷你-确定</a>
<a href="javascript:;" class="weui_btn weui_btn_mini weui_btn_default">按钮-迷你-取消</a>

列表项

这里写图片描述

<div class="weui_cells">
    <div class="weui_cell">
        <div class="weui_cell_bd weui_cell_primary">
            <p>带说明的列表项</p>
        </div>
        <div class="weui_cell_ft">说明文字</div>
    </div>
</div>
<div class="weui_cells weui_cells_access">
    <a class="weui_cell" href="javascript:;">
        <div class="weui_cell_hd">
            <img src="" alt="icon" style="width:20px;margin-right:5px;display:block">
        </div>
        <div class="weui_cell_bd weui_cell_primary">
            <p>带图标、说明、跳转的列表项</p>
        </div>
        <div class="weui_cell_ft">说明文字</div>
    </a>
    <a class="weui_cell" href="javascript:;">
        <div class="weui_cell_bd weui_cell_primary">
            <p>说明、跳转的列表项</p>
        </div>
        <div class="weui_cell_ft">说明文字</div>
    </a>
</div>

单选列表项
 

这里写图片描述

<div class="weui_cells weui_cells_radio">
    <label class="weui_cell weui_check_label" for="x11">
        <div class="weui_cell_bd weui_cell_primary">
            <p>单选列表项1</p>
        </div>
        <div class="weui_cell_ft">
            <input type="radio" class="weui_check" name="radio1" id="x11">
            <span class="weui_icon_checked"></span>
        </div>
    </label>
    <label class="weui_cell weui_check_label" for="x12">
        <div class="weui_cell_bd weui_cell_primary">
            <p>单选列表项2</p>
        </div>
        <div class="weui_cell_ft">
            <input type="radio" name="radio1" class="weui_check" id="x12" checked="checked">
            <span class="weui_icon_checked"></span>
        </div>
    </label>
</div>

复选列表项

这里写图片描述

<div class="weui_cells weui_cells_checkbox">
    <label class="weui_cell weui_check_label" for="s11">
        <div class="weui_cell_hd">
            <input type="checkbox" class="weui_check" name="checkbox1" id="s11" checked="checked">
            <i class="weui_icon_checked"></i>
        </div>
        <div class="weui_cell_bd weui_cell_primary">
            <p>复选列表项1</p>
        </div>
    </label>
    <label class="weui_cell weui_check_label" for="s12">
        <div class="weui_cell_hd">
            <input type="checkbox" name="checkbox1" class="weui_check" id="s12">
            <i class="weui_icon_checked"></i>
        </div>
        <div class="weui_cell_bd weui_cell_primary">
            <p>复选列表项2</p>
        </div>
    </label>
    <label class="weui_cell weui_check_label" for="s13">
        <div class="weui_cell_hd">
            <input type="checkbox" name="checkbox1" class="weui_check" id="s13">
            <i class="weui_icon_checked"></i>
        </div>
        <div class="weui_cell_bd weui_cell_primary">
            <p>复选列表项3</p>
        </div>
    </label>
    <label class="weui_cell weui_check_label" for="s14">
        <div class="weui_cell_hd">
            <input type="checkbox" name="checkbox1" class="weui_check" id="s14">
            <i class="weui_icon_checked"></i>
        </div>
        <div class="weui_cell_bd weui_cell_primary">
            <p>复选列表项4</p>
        </div>
    </label>
</div>

其他表单
 

这里写图片描述

<div class="weui_cells weui_cells_form">
    <div class="weui_cell">
        <div class="weui_cell_hd">
            <label class="weui_label">qq</label>
        </div>
        <div class="weui_cell_bd weui_cell_primary">
            <input class="weui_input" type="number" pattern="[0-9]*" placeholder="请输入qq号" />
        </div>
    </div>
    <div class="weui_cell weui_vcode">
        <div class="weui_cell_hd">
            <label class="weui_label">验证码</label>
        </div>
        <div class="weui_cell_bd weui_cell_primary">
            <input class="weui_input" type="text" placeholder="请输入验证码" />
        </div>
        <div class="weui_cell_ft">
            <img src="../img/vcode.jpg" />
        </div>
    </div>
    <div class="weui_cell">
        <div class="weui_cell_hd">
            <label class="weui_label">银行卡</label>
        </div>
        <div class="weui_cell_bd weui_cell_primary">
            <input class="weui_input" type="number" pattern="[0-9]*" placeholder="请输入银行卡号" />
        </div>
    </div>
    <div class="weui_cell weui_vcode weui_cell_warn">
        <div class="weui_cell_hd">
            <label class="weui_label">验证码</label>
        </div>
        <div class="weui_cell_bd weui_cell_primary">
            <input class="weui_input" type="number" placeholder="请输入验证码" />
        </div>
        <div class="weui_cell_ft">
            <i class="weui_icon_warn"></i>
            <img src="../img/vcode.jpg" />
        </div>
    </div>
</div>

图片上传

这里写图片描述

<div class="weui_cells weui_cells_form">
    <div class="weui_cell">
        <div class="weui_cell_bd weui_cell_primary">
            <div class="weui_uploader">
                <div class="weui_uploader_hd weui_cell">
                    <div class="weui_cell_bd weui_cell_primary">图片上传</div>
                    <div class="weui_cell_ft">0/2</div>
                </div>
                <div class="weui_uploader_bd">
                    <ul class="weui_uploader_files">
                        <li class="weui_uploader_file" style="background-image:url(http://shp.qpic.cn/weixinsrc_pic/pScBR7sbqjOBJomcuvVJ6iacVrbMJaoJZkFUIq4nzQZUIqzTKziam7ibg/)"></li>
                        <li class="weui_uploader_file" style="background-image:url(http://shp.qpic.cn/weixinsrc_pic/pScBR7sbqjOBJomcuvVJ6iacVrbMJaoJZkFUIq4nzQZUIqzTKziam7ibg/)"></li>
                        <li class="weui_uploader_file" style="background-image:url(http://shp.qpic.cn/weixinsrc_pic/pScBR7sbqjOBJomcuvVJ6iacVrbMJaoJZkFUIq4nzQZUIqzTKziam7ibg/)"></li>
                        <li class="weui_uploader_file weui_uploader_status" style="background-image:url(http://shp.qpic.cn/weixinsrc_pic/pScBR7sbqjOBJomcuvVJ6iacVrbMJaoJZkFUIq4nzQZUIqzTKziam7ibg/)">
                            <div class="weui_uploader_status_content">
                                <i class="weui_icon_warn"></i>
                            </div>
                        </li>
                        <li class="weui_uploader_file weui_uploader_status" style="background-image:url(http://shp.qpic.cn/weixinsrc_pic/pScBR7sbqjOBJomcuvVJ6iacVrbMJaoJZkFUIq4nzQZUIqzTKziam7ibg/)">
                            <div class="weui_uploader_status_content">50%</div>
                        </li>
                    </ul>
                    <div class="weui_uploader_input_wrp">
                        <input class="weui_uploader_input" type="file" accept="image/jpg,image/jpeg,image/png,image/gif" multiple />
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

日期时间
 

这里写图片描述

<div class="weui_cell">
    <div class="weui_cell_hd">
        <label for="" class="weui_label">日期</label>
    </div>
    <div class="weui_cell_bd weui_cell_primary">
        <input class="weui_input" type="date" value="" />
    </div>
</div>
<div class="weui_cell">
    <div class="weui_cell_hd">
        <label for="" class="weui_label">时间</label>
    </div>
    <div class="weui_cell_bd weui_cell_primary">
        <input class="weui_input" type="datetime-local" value="" placeholder="" />
    </div>
</div>

下拉框
 

这里写图片描述

<div class="weui_cells">
    <div class="weui_cell weui_cell_select weui_select_before">
        <div class="weui_cell_hd">
            <select class="weui_select" name="select2">
                <option value="1"> 86</option>
                <option value="2"> 80</option>
                <option value="3"> 84</option>
                <option value="4"> 87</option>
                <option value="4"> 你大爷</option>
            </select>
        </div>
        <div class="weui_cell_bd weui_cell_primary">
            <input class="weui_input" type="number" pattern="[0-9]*" placeholder="请输入号码" />
        </div>
    </div>
</div>
<div class="weui_cells">
    <div class="weui_cell weui_cell_select">
        <div class="weui_cell_bd weui_cell_primary">
            <select class="weui_select" name="select1">
                <option selected="" value="1">微信号</option>
                <option value="2">QQ号</option>
                <option value="3">Email</option>
            </select>
        </div>
    </div>
    <div class="weui_cell weui_cell_select weui_select_after">
        <div class="weui_cell_hd">
            国家/地区
        </div>
        <div class="weui_cell_bd weui_cell_primary">
            <select class="weui_select" name="select2">
                <option value="1">中国</option>
                <option value="2">美国</option>
                <option value="3">英国</option>
            </select>
        </div>
    </div>
</div>

自定义弹窗内容-选择框
 

这里写图片描述

<div id="Dialog1" class="weui_dialog_confirm">
    <div class="weui_mask"></div>
    <div class="weui_dialog">
        <div class="weui_dialog_hd"><strong class="weui_dialog_title">弹窗标题</strong></div>
        <div class="weui_dialog_bd">自定义弹窗内容<br>...</div>
        <div class="weui_dialog_ft">
            <a name="no" href="javascript:;" class="weui_btn_dialog default">取消</a>
            <a name="yes" href="javascript:;" class="weui_btn_dialog primary">确定</a>
        </div>
    </div>
</div>
<script>
$("#Dialog1").find("[name='no']").click(function(){
    $("#Dialog1").hide();
    // 活用一下显示延迟关闭方法
    // $('#Dialog1').show().delay(3000).hide(0);
});
$("#Dialog1").find("[name='yes']").click(function(){
    $("#Dialog1").hide();
});
</script>

自定义弹窗内容-确定框
 

这里写图片描述

<div id="Dialog2" class="weui_dialog_alert">
    <div class="weui_mask"></div>
    <div class="weui_dialog">
        <div class="weui_dialog_hd"><strong class="weui_dialog_title">弹窗标题</strong></div>
        <div class="weui_dialog_bd">弹窗内容,告知当前页面信息等</div>
        <div class="weui_dialog_ft">
            <a name="yes" href="javascript:;" class="weui_btn_dialog primary">确定</a>
        </div>
    </div>
</div>
<script>
$("#Dialog2").find("[name='yes']").click(function(){
    $("#Dialog2").hide();
});
</script>

进度条
 

这里写图片描述

<div class="weui_progress">
    <div class="weui_progress_bar">
        <div id="prs" class="weui_progress_inner_bar" style="width: 50%;"></div>
    </div>
    <a href="javascript:;" class="weui_progress_cancel">
        <i class="weui_icon_cancel"></i>
    </a>
</div>
<div class="weui_btn_area">
    <a href="javascript:;" class="weui_btn weui_btn_primary" id="btnStartProgress">上传</a>
</div>
<script>
$("#btnStartProgress").click(function(){
    $('#prs').animate(
        {width:"100%"},
        5000,
        function(){
            $(this).css("width","10%");
        }
    );
});
</script>

提醒框
 

这里写图片描述

<div id="toast">
    <div class="weui_mask_transparent"></div>
    <div class="weui_toast">
        <i class="weui_icon_toast"></i>
        <p class="weui_toast_content">操作异常<br>(2秒后自动关闭)</p>
    </div>
</div>
<script>
setTimeout(function(){
    $("#toast").hide();
}, 2000);
</script>

加载框
 

这里写图片描述

<div id="loadingToast" class="weui_loading_toast">
    <div class="weui_mask_transparent"></div>
    <div class="weui_toast">
        <div class="weui_loading">
            <div class="weui_loading_leaf weui_loading_leaf_0"></div>
            <div class="weui_loading_leaf weui_loading_leaf_1"></div>
            <div class="weui_loading_leaf weui_loading_leaf_2"></div>
            <div class="weui_loading_leaf weui_loading_leaf_3"></div>
            <div class="weui_loading_leaf weui_loading_leaf_4"></div>
            <div class="weui_loading_leaf weui_loading_leaf_5"></div>
            <div class="weui_loading_leaf weui_loading_leaf_6"></div>
            <div class="weui_loading_leaf weui_loading_leaf_7"></div>
            <div class="weui_loading_leaf weui_loading_leaf_8"></div>
            <div class="weui_loading_leaf weui_loading_leaf_9"></div>
            <div class="weui_loading_leaf weui_loading_leaf_10"></div>
            <div class="weui_loading_leaf weui_loading_leaf_11"></div>
        </div>
        <p class="weui_toast_content">数据加载中</p>
    </div>
</div>
<script>
setTimeout(function(){
    $("#loadingToast").hide();
}, 3000);
</script>

结果页
 

这里写图片描述

<div class="weui_msg">
    <div class="weui_icon_area"><i class="weui_icon_success weui_icon_msg"></i></div>
    <div class="weui_text_area">
        <h2 class="weui_msg_title">操作成功</h2>
        <p class="weui_msg_desc">内容详情,可根据实际需要安排</p>
    </div>
    <div class="weui_opr_area">
        <p class="weui_btn_area">
            <a href="javascript:;" class="weui_btn weui_btn_primary">确定</a>
            <a href="javascript:;" class="weui_btn weui_btn_default">取消</a>
        </p>
    </div>
    <div class="weui_extra_area">
        <a href="">查看详情</a>
    </div>
</div>

文章页
 

这里写图片描述

<article class="weui_article">
    <h1>大标题</h1>
    <section>
        <h2 class="title">章标题</h2>
        <section>
            <h3>1.1 节标题</h3>
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
                tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
                quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
                consequat. Duis aute</p>
        </section>
        <section>
            <h3>1.2 节标题</h3>
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
                tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
                cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
                proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
        </section>
    </section>
</article>

图标
 

这里写图片描述

<i class="weui_icon_msg weui_icon_success"></i>
<i class="weui_icon_msg weui_icon_info"></i>
<i class="weui_icon_msg weui_icon_warn"></i>
<i class="weui_icon_msg weui_icon_waiting"></i>
<i class="weui_icon_safe weui_icon_safe_success"></i>
<i class="weui_icon_safe weui_icon_safe_warn"></i>
<div class="icon_sp_area">
    <i class="weui_icon_success"></i>
    <i class="weui_icon_success_circle"></i>
    <i class="weui_icon_success_no_circle"></i>
    <i class="weui_icon_info"></i>
    <i class="weui_icon_waiting"></i>
    <i class="weui_icon_waiting_circle"></i>
    <i class="weui_icon_circle"></i>
    <i class="weui_icon_warn"></i>
    <i class="weui_icon_download"></i>
    <i class="weui_icon_info_circle"></i>
    <i class="weui_icon_cancel"></i>
</div>

示例菜单
 

这里写图片描述

 

<div class="bd spacing">
    <a href="javascript:;" class="weui_btn weui_btn_primary" id="showActionSheet">点击上拉ActionSheet</a>
</div>
<div id="actionSheet_wrap">
    <div class="weui_mask_transition" id="mask"></div>
    <div class="weui_actionsheet" id="weui_actionsheet">
        <div class="weui_actionsheet_menu">
            <div id="actionsheet1" class="weui_actionsheet_cell">示例菜单1</div>
            <div id="actionsheet2" class="weui_actionsheet_cell">示例菜单2</div>
            <div id="actionsheet3" class="weui_actionsheet_cell">示例菜单3</div>
            <div id="actionsheet4" class="weui_actionsheet_cell">示例菜单4</div>
        </div>
        <div class="weui_actionsheet_action">
            <div class="weui_actionsheet_cell" id="actionsheet_cancel">取消</div>
        </div>
    </div>
</div>
<script>
$("#showActionSheet").click(function(){
    var mask = $("#mask");
    var weuiActionsheet = $("#weui_actionsheet");
    mask.show().addClass('weui_fade_toggle').click(function(){
        hideActionSheet(weuiActionsheet, mask);
    });
    $("#actionsheet_cancel").click(function(){
        hideActionSheet(weuiActionsheet, mask);
    });
    $("#actionsheet1").add($("#actionsheet2")).add($("#actionsheet3")).add($("#actionsheet4")).unbind("click");
    $("#actionsheet1").click(function(){
        alert("点击了示例菜单1");
        hideActionSheet(weuiActionsheet, mask);
    });
    $("#actionsheet2").click(function(){
        alert("点击了示例菜单2");
        hideActionSheet(weuiActionsheet, mask);
    });
    $("#actionsheet3").click(function(){
        alert("点击了示例菜单3");
        hideActionSheet(weuiActionsheet, mask);
    });
    $("#actionsheet4").click(function(){
        alert("点击了示例菜单4");
        hideActionSheet(weuiActionsheet, mask);
    });
    weuiActionsheet.addClass('weui_actionsheet_toggle');
    weuiActionsheet.unbind('transitionend').unbind('webkitTransitionEnd');

    var hideActionSheet = function(weuiActionsheet, mask){
        weuiActionsheet.removeClass("weui_actionsheet_toggle");
        mask.removeClass("weui_fade_toggle");
        weuiActionsheet.on('transitionend', function() {
            mask.hide();
        }).on('webkitTransitionEnd',
        function() {
            mask.hide();
        });
    }
});
</script>

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持Devmax。

HTML5 weui使用笔记的更多相关文章

  1. 移动HTML5前端框架—MUI的使用

    这篇文章主要介绍了移动HTML5前端框架—MUI的使用的相关资料,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧

  2. HTML5 weui使用笔记

    这篇文章主要介绍了HTML5 weui使用笔记,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧

  3. Html5写一个简单的俄罗斯方块小游戏

    这篇文章主要介绍了基于Html5写一个简单的俄罗斯方块小游戏,本文通过图文并茂的形式给大家介绍的非常详细,具有一定的参考借鉴价值,需要的朋友参考下吧

  4. ios – UITableView和Cell Reuse

    这是我的CustomCell类的init方法解决方法如果没有要显示的图像,则必须清除图像视图:

  5. ios – fetchedResultsController.fetchedObjects.count = 0但它充满了对象

    我正在使用相当标准的fetchedResultsController实现来输出tableView.在-viewDidLoad的最后,我正在进行第一次调用:这是我的fetchedResultsController:我的tableView方法:所以,问题是:在_fetchedResultsController.fetchedobjects.count的日志中等于0,但在视觉上tableView充满了对

  6. ios – 如何实现`prepareForReuse`?

    解决方法尝试将此添加到您的MGSwipeTableCell.m:

  7. ios – 我的表视图在滚动时在SWIFT中重用所选单元格

    实例变量

  8. ios – 在uicollectionview底部添加加载指示符

    解决方法不,没有“内置”的方式.您需要做的是有一个包含加载器的额外单元格.检测此单元格何时出现非常简单,此时您可以启动调用以加载更多数据.

  9. ios – UICollectionView神秘崩溃

    我有一个UICollectionView,我用从Internet下载的图像填充单元格.为此我使用SDWebImage.我的代码如下所示:我相信我已经正确地设置了它.但应用程序完全随机崩溃,有时会留下此堆栈跟踪:日志区域中没有其他消息.我尝试设置异常断点,但每次发生此崩溃时,都会显示此堆栈跟踪.有谁知道可能是什么问题?解决方法如果有人在寻找答案,我已经解决了问题,并回答了与同一问题有关的另一个问题.你可以找到它here.希望它有所帮助!

  10. ios – 具有动态单元格高度的UITableViewCell内的UITableView

    我有一个动态的项目列表,每个项目可以有不同的teamplate/布局(和高度).其中一个项目类型可以有一个内部的项目列表供选择,定期5-6行,每行有不同的高度.如果我尝试进一步描述它,在我的场景中,我在另一个tableview(#master)的tableviewcells(#master-cell)中有一个tableview(#slave).此外,我的#slavetableview中的单元格(#

随机推荐

  1. 微信小程序canvas实现水平、垂直居中效果

    这篇文章主要介绍了小程序中canvas实现水平、垂直居中效果,本文图文实例代码相结合给大家介绍的非常详细,具有一定的参考借鉴价值,需要的朋友可以参考下

  2. 使用HTML5做的导航条详细步骤

    这篇文章主要介绍了用HTML5做的导航条详细步骤,本文给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友可以参考下

  3. H5最强接口之canvas实现动态图形功能

    这篇文章主要介绍了H5最强接口之canvas实现动态图形功能,需要的朋友可以参考下

  4. Canvas高级路径操作之拖拽对象的实现

    这篇文章主要介绍了Canvas高级路径操作之拖拽对象的实现,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧

  5. html5视频自动横过来自适应页面且点击播放功能的实现

    这篇文章主要介绍了h5视频自动横过来自适应页面且点击播放,本文通过实例代码给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友可以参考下

  6. 详解HTML5中的picture元素响应式处理图片

    这篇文章主要介绍了详解HTML5中的picture元素响应式处理图片,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧

  7. canvas像素点操作之视频绿幕抠图

    这篇文章主要介绍了canvas像素点操作之视频绿幕抠图的相关资料,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧

  8. html5利用canvas实现颜色容差抠图功能

    这篇文章主要介绍了html5利用canvas实现颜色容差抠图功能,非常不错,具有一定的参考借鉴价值,需要的朋友可以参考下

  9. canvas绘制视频封面的方法

    这篇文章主要介绍了canvas绘制视频封面的方法的相关资料,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧

  10. HTML5拖拽功能实现的拼图游戏

    本文通过实例代码给大家介绍了HTML5拖拽功能实现的拼图游戏,代码简单易懂,非常不错,具有一定的参考借鉴价值,需要的朋友参考下吧

返回
顶部