Metro UI CSS学习笔记之组件(列表视图)分析

java哥 阅读:305 2021-03-31 22:43:30 评论:0

查阅Metro UI CSS 对组件(列表视图)描述,本人觉得已经描述的很详细,所以在这里不打算做详细的讲解,大家可以直接阅读以下源代码(是进过本人已经优化后的代码)。

温馨提示:相关注释,也已经在代码中添加。

<!DOCTYPE html> 
<html> 
<head> 
    <meta charset="utf-8"> 
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> 
    <!--metro UI css 样式文件(组件基础)--> 
    <link href="css/metro-bootstrap.css" rel="stylesheet"> 
    <link href="css/metro-bootstrap-responsive.css" rel="stylesheet"> 
    <!--metro UI css 样式文件(组件基础)--> 
    <link href="css/modern.css" rel="stylesheet"> 
    <link href="css/modern-responsive.css" rel="stylesheet"> 
 
    <!--加载jquery js 文件--> 
    <script src="js/jquery/jquery.min.js"></script> 
    <script src="js/jquery/jquery.widget.min.js"></script> 
    <!--加载metro js 文件--> 
    <script src="js/metro/metro.min.js"></script> 
    <!--加载第三方js 文件--> 
    <script src="js/modern/dropdown.js"></script><!--下拉菜单第三方控件--> 
    <script src="js/modern/pagecontrol.js"></script><!--多页控件第三方js--> 
    <script src="js/modern/accordion.js"></script><!--手风琴第三方js--> 
    <script src="js/modern/buttonset.js"></script><!--button第三方js--> 
    <script src="js/modern/rating.js"></script><!--评分第三方js--> 
    <script src="js/modern/carousel.js"></script><!--幻灯片第三方js--> 
 
    <script src=""></script> 
    <title>Modern UI CSS 学习笔记</title> 
 
 
 
</head> 
<body class="modern-ui" style="background: #f1f1f1"> 
 
<div class="page"> 
    <div class="page-header"> 
        <div class="page-header-content"> 
            <h3>Metro UI CSS样式文件之组件(对话框)</h3> 
        </div> 
    </div> 
 
    <div class="page-region"> 
        <div class="page-region-content"> 
            <div class="span10"> 
            <p>列表视图 Demo</p> 
                <ul class="listview"> 
                    <li class="bg-color-pinkDark fg-color-white"> 
                        <div class="icon"> 
                            <img src="./images/onenote2013icon.png"> 
                        </div> 
 
                        <div class="data"> 
                            <h4 class="fg-color-white">OneNote 2013</h4> 
                            <div class="static-rating small"> 
                                <div style="width: 75%" class="rating-value"></div> 
                            </div> 
                            <p>1 RUB</p> 
                        </div> 
                    </li> 
 
                    <li> 
                        <div class="icon"> 
                            <img src="./images/excel2013icon.png"> 
                        </div> 
 
                        <div class="data"> 
                            <h4>Excel 2013</h4> 
                            <div class="static-rating small"> 
                                <div style="width: 75%" class="rating-value"></div> 
                            </div> 
                            <p>1 RUB</p> 
                        </div> 
                    </li> 
 
                    <li class="selected"> 
                        <div class="icon"> 
                            <img src="./images/word2013icon.png"> 
                        </div> 
 
                        <div class="data"> 
                            <h4>Word 2013</h4> 
                            <div class="static-rating small"> 
                                <div style="width: 75%" class="rating-value"></div> 
                            </div> 
                            <p>1 RUB</p> 
                        </div> 
                    </li> 
 
                    <li> 
                        <div class="icon"> 
                            <img src="images/firefox.png"> 
                        </div> 
 
                        <div class="data"> 
                            <h4>Firefox</h4> 
                            <div class="progress-bar"> 
                                <div style="width: 75%" class="bar"></div> 
                            </div> 
                            <p>Download...</p> 
                        </div> 
                    </li> 
                </ul> 
 
                <p>流体列表视图</p> 
                <ul class="listview fluid"> 
                    <li> 
                        <div class="icon"> 
                            <img src="./images/onenote2013icon.png"> 
                        </div> 
 
                        <div class="data"> 
                            <h4>OneNote 2013</h4> 
                            <div class="static-rating small"> 
                                <div style="width: 75%" class="rating-value"></div> 
                            </div> 
                            <p>1 RUB</p> 
                        </div> 
                    </li> 
 
                    <li> 
                        <div class="icon"> 
                            <img src="./images/firefox.png"> 
                        </div> 
 
                        <div class="data"> 
                            <h4>Firefox</h4> 
                            <div class="static-rating small"> 
                                <div style="width: 75%" class="rating-value"></div> 
                            </div> 
                            <p>Free</p> 
                        </div> 
                    </li> 
 
                    <li class="bg-color-blueDark fg-color-white"> 
                        <div class="icon"> 
                            <img src="./images/word2013icon.png"> 
                        </div> 
 
                        <div class="data"> 
                            <h4 class="fg-color-white">Word 2013</h4> 
                            <div class="static-rating small"> 
                                <div style="width: 75%" class="rating-value"></div> 
                            </div> 
                            <p>1 RUB</p> 
                        </div> 
                    </li> 
 
                    <li class="selected"> 
                        <div class="icon"> 
                            <img src="./images/excel2013icon.png"> 
                        </div> 
 
                        <div class="data"> 
                            <h4>Excel 2013</h4> 
                            <div class="static-rating small"> 
                                <div style="width: 75%" class="rating-value"></div> 
                            </div> 
                            <p>1 RUB</p> 
                        </div> 
                    </li> 
                </ul> 
 
                <p>图像列表视图</p> 
                <ul class="listview image"> 
                    <li> 
                        <div class="icon"> 
                            <img src="./images/myface.jpg"> 
                        </div> 
                        <div class="data"> 
                            <h4>This is a my face</h4> 
                            <p> 
                                Hi! My name is Sergey Pimenov and i'm author of Metro UI CSS from Kiev, Ukraine. 
                            </p> 
                            <a href="mailto:sergey@pimenov.com.ua">sergey@pimenov.com.ua</a> 
 
 
                        </div> 
                    </li> 
                    <li class="bg-color-red fg-color-white"> 
                        <div class="icon"> 
                            <img src="./images/1.jpg"> 
                        </div> 
                        <div class="data"> 
                            <h4 class="fg-color-white">Bear</h4> 
                            <p> 
                                Bears are mammals of the family Ursidae. Bears are classified as caniforms, or doglike carnivorans, with the pinnipeds being their closest living relatives. 
                            </p> 
                        </div> 
                    </li> 
                    <li class="selected"> 
                        <div class="icon"> 
                            <img src="./images/myface.jpg"> 
                        </div> 
                        <div class="data"> 
                            <h4>This is a my face</h4> 
                            <div class="static-rating small"> 
                                <div style="width: 100%" class="rating-value"></div> 
                            </div> 
                            <p> 
                                Hi! My name is Sergey Pimenov and i'm author of Metro UI CSS from Kiev, Ukraine. 
                            </p> 
                            <a href="mailto:sergey@pimenov.com.ua">sergey@pimenov.com.ua</a> 
                        </div> 
                    </li> 
                </ul> 
 
                <p>图标列表视图</p> 
                <ul class="listview iconic"> 
                    <li> 
                        <div class="icon"> 
                            <img src="./images/excel2013icon.png"> 
                        </div> 
                        <div class="data"> 
                            <h4>Excel 2013</h4> 
                        </div> 
                    </li> 
                    <li> 
                        <div class="icon"> 
                            <img src="./images/word2013icon.png"> 
                        </div> 
                        <div class="data"> 
                            <h4>Word 2013</h4> 
                        </div> 
                    </li> 
                    <li> 
                        <div class="icon"> 
                            <img src="./images/onenote2013icon.png"> 
                        </div> 
                        <div class="data"> 
                            <h4>OneNote 2013</h4> 
                        </div> 
                    </li> 
                </ul> 
 
                <h2>带有标记的列表视图</h2> 
                <p> 
                   你可以使用徽章设置listview 类型。.设置徽章的背景颜色或者前景颜色,你可以使用颜色样式。 <br /> 
                    如果你想要设置徽章的长度,你必须为Div 徽章添加Strech 样式类。 
                </p> 
                <h3>CSS类</h3> 
                <p> 
                    <b>.strech</b> -设置徽章长度<br /> 
                    <b>.right</b> - 设置徽章靠右 (默认: 靠左)<br /> 
                    <b>.bottom</b> - 设置徽章靠底部 (默认:靠顶)<br /> 
                </p> 
                <br /> 
 
                <ul class="listview"> 
                    <li> 
                        <div class="badge">1 new</div> 
 
                        <div class="icon"> 
                            <i class="icon-mail"></i> 
                        </div> 
 
                        <div class="data"> 
                            <h4>Mail from <a href="mailto:vabatta@gmail.com">vabatta@gmail.com</a></h4> 
                            <p> 
                                Hey Sergey, your metro UI is awesome!<br /> 
                                Keep up the hard work! 
                            </p> 
                        </div> 
                    </li> 
 
                    <li> 
                        <div class="badge strech">6 new documents</div> 
 
                        <div class="icon"> 
                            <img src="images/word2013icon.png" /> 
                        </div> 
 
                        <div class="data"> 
                            <h4>Word 2013</h4> 
                            <div class="static-rating small"> 
                                <div class="rating-value" style="width: 75%"></div> 
                            </div> 
                            <p>1 RUB</p> 
                        </div> 
                    </li> 
 
                    <li> 
                        <div class="badge bg-color-red right bottom">75% done</div> 
 
                        <div class="icon"> 
                            <img src="images/firefox.png" /> 
                        </div> 
 
                        <div class="data"> 
                            <h4>Firefox</h4> 
                            <div class="progress-bar"> 
                                <div class="bar" style="width: 75%"></div> 
                            </div> 
                            <p>Download...</p> 
                        </div> 
                    </li> 
                </ul> 
            </div> 
 
 
 
 
 
 
 
        </div> 
    </div> 
 
</body> 
</html>
效果展示:



盆友们:到此Metro UI CSS 学习课程全部已经完成哒,我学习的Demo已经上传,资源下载地址:http://download.csdn.net/detail/zhouzhiwengang/8391507.

想参考Metro UI CSS 官网地址:http://www.bootcss.com/p/metro-ui-css/.


声明

1.本站遵循行业规范,任何转载的稿件都会明确标注作者和来源;2.本站的原创文章,请转载时务必注明文章作者和来源,不尊重原创的行为我们将追究责任;3.作者投稿可能会经我们编辑修改或补充。

发表评论
搜索
KIKK导航

KIKK导航

排行榜
关注我们

一个IT知识分享的公众号