layui a navigation bar functions

1. This time of writing layui navigation bar today encountered a headache problem is to follow the example of how to get the official website Dounong unsuccessful,

Later found script src tag is used as a reference but I stepped on a pit a href

On this point I specially went and looked understand previously unknown knowledge

hrefAnd is a reference to the associated page, is to establish a link between the current element and reference resources, srcis a reference resource, expressed replace the current element, used on img, script, iframe, src is an indispensable part of the page content. This provision is considered, you remember something else to get src expressed on this page, href is the window to the place to go.

  

2. enter the following code section (Note that the code in the script tags do not forget)

<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="/layui/css/layui.css">
    <script src="/layui/layui.js"></script>
    <title>layuidemo</title>
</head>
<body>
<ul class="layui-nav" lay-filter="">
    <li class="layui-nav-item"><a href="">最新活动</a></li>
    <li class="layui-nav-item layui-this"><a href="">产品</a></li>
    <li class="layui-nav-item"><a href="">大数据</a></li>
    <Li class = "layui-NAV-Item"> 
        <a href="javascript:;">解决方案</a>
        <DL class = "NAV-Child-layui"> <-! secondary menu -> 
            <dd> <a href=""> mobile module </a> </ dd> 
            <dd> <a href=""> background stencil </a> </ dd> 
            <dd> <a href=""> business platform </a> </ dd> 
        </ DL> 
    < / li> 
    <li class = "layui-NAV-Item"> <a href=""> community </a> </ li> 
</ ul> 

<Script> 
    // Note: The navigation module dependent element, or can not be functional operations 
    layui.use ( 'Element', function () { 
        var = layui.element Element; 

        // ...
     } ); 
</ Script>
</body>
</html>
layui navigation

 

Guess you like

Origin www.cnblogs.com/yaoliuyang/p/12619385.html