element-ui 的使用教程

element-ui 经常与 vue 结合使用
那么就需要引入三个组件库
	-- css 样式: 用来对标签元素进行渲染美化
		<link rel="stylesheet" href="../plugins/elementui/index.css">
        <link rel="stylesheet" href="../plugins/font-awesome/css/font-awesome.min.css">
        <link rel="stylesheet" href="../plugins/css/style.css">
	-- js 样式: 用来将数据进行动态展示
		<script type="text/javascript" src="../plugins/js/jquery.min.js"></script>
	-- element-ui 组件: 大佬写好的功能组件
		<script src="../plugins/elementui/index.js"></script>
	-- vue 组件: 用来实现实现响应数据的绑定和组合的视图组件
		<script src="../plugins/js/vue.js"></script>
这些组件需要进行下载, 光写标签是没用的,这几个标签是我在测试 element-ui 表格组件时使用的
复制这段内容后打开百度网盘手机App,操作更方便哦
链接:https://pan.baidu.com/s/1UVq3YoamvjBo0ZyeXITI7A 
提取码:k0js 

在这里插入图片描述

文件代码如下:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>晶</title>
    <style>
        div1 {
            border: 1px solid gold;/*显示边框*/
            width: 30%;/*边框宽度*/
            height: 300px;/*边框高度*/
            margin: auto;/*页面中边框位置*/
        }
        .left {
            border: 1px solid gold;/*显示边框*/
            width: 24%;/*边框宽度*/
            height: 300px;/*边框高度*/
            float: left;
        }
        .center {
            border: 1px solid gold;/*显示边框*/
            width: 51%;/*边框宽度*/
            height: 300px;/*边框高度*/
            float: left;
        }
        .right {
            border: 1px solid gold;/*显示边框*/
            width: 24%;/*边框宽度*/
            height: 300px;/*边框高度*/
            float: left;
        }
        .a{
            text-align: center;
            background: #9ad5ff;
            text-decoration:none
        }
        .el-dropdown-link {
            cursor: pointer;
            color: #409EFF;
        }
        .el-icon-arrow-down {
            font-size: 12px;
        }
    </style>
</head>
<link rel="stylesheet" href="element-ui/lib/theme-chalk/index.css"> <!-- 引入样式 -->
<script src="js/vue.js"></script> <!--vue 的核心文件-->
<script src="element-ui/lib/index.js"></script> <!-- 引入组件库 -->
<body>
    <div id="app">
        <el-dropdown>
            <span class="el-dropdown-link">
                搜索引擎<i class="el-icon-arrow-down el-icon--right"></i>
            </span>
            <el-dropdown-menu slot="dropdown">
                <a href="http://www.baidu.com" target="_blank">百度一下</a> <br/>
                <a href="https://cn.bing.com/" target="_blank">必应</a> <br/>
                <a href="http://www.chinaso.com/" target="_blank">中国搜索</a> <br/>
                <a href="https://www.asklib.com/" target="_blank">问答库</a> <br/>
                <a href="https://mijisou.com/" target="_blank">秘迹搜索</a> <br/>
            </el-dropdown-menu>
        </el-dropdown><br/>
    </div>
</body>
<script>
    new Vue({
        el: '#app',
        data: function() {
            return { visible: false }
        }
    })
</script>
</html>
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值