问题描述
您好,我正在使用VS Code。在emmet中,我有一个问题去匹配header.PHP中的标签。我的header.PHP有一些未封闭的div。我认为因此emmet去匹配对opiton不起作用。 emmet是否可以在未封闭的标签中工作?
<!DOCTYPE html>
<html lang="en">
<!-- Mirrored from radixtouch.in/templates/admin/aegis/source/light/index.html by httrack Website copier/3.x [XR&CO'2014],Mon,04 May 2020 09:24:49 GMT -->
<head>
<Meta charset="UTF-8">
<Meta content="width=device-width,initial-scale=1,maximum-scale=1,shrink-to-fit=no" name="viewport">
<title>Aegis - Admin Dashboard Template</title>
<!-- General CSS Files -->
<link rel="stylesheet" href="<?PHP echo base_url(); ?>assets/css/app.min.css">
<link rel="stylesheet" href="<?PHP echo base_url(); ?>assets/bundles/jqvmap/dist/jqvmap.min.css">
<link rel="stylesheet" href="<?PHP echo base_url(); ?>assets/bundles/weather-icon/css/weather-icons.min.css">
<link rel="stylesheet" href="<?PHP echo base_url(); ?>assets/bundles/weather-icon/css/weather-icons-wind.min.css">
<link rel="stylesheet" href="<?PHP echo base_url(); ?>assets/bundles/summernote/summernote-bs4.css">
<!-- Template CSS -->
<link rel="stylesheet" href="<?PHP echo base_url(); ?>assets/css/style.css">
<link rel="stylesheet" href="<?PHP echo base_url(); ?>assets/css/components.css">
<!-- Custom style CSS -->
<link rel="stylesheet" href="<?PHP echo base_url(); ?>assets/css/custom.css">
<link rel='shortcut icon' type='image/x-icon' href='<?PHP echo base_url(); ?>assets/img/favicon.ico' />
</head>
<body>
<div class="loader"></div>
<div id="app">
<div class="main-wrapper main-wrapper-1">
<div class="navbar-bg"></div>
<nav class="navbar navbar-expand-lg main-navbar">
<div class="form-inline mr-auto">
<ul class="navbar-nav mr-3">
<li><a href="#" data-toggle="sidebar" class="nav-link nav-link-lg
collapse-btn"> <i data-feather="align-justify"></i></a></li>
<li><a href="#" class="nav-link nav-link-lg fullscreen-btn">
<i data-feather="maximize"></i>
</a></li>
<li>
<form class="form-inline mr-auto">
<div class="search-element">
<input class="form-control" type="search" placeholder="Search" aria-label="Search" data-width="200">
<button class="btn" type="submit">
<i class="fas fa-search"></i>
</button>
</div>
</form>
</li>
</ul>
</div>
<ul class="navbar-nav navbar-right">
<li class="dropdown dropdown-list-toggle"><a href="#" data-toggle="dropdown"
class="nav-link nav-link-lg message-toggle"><i data-feather="mail"></i>
<span class="badge headerBadge1">
6 </span> </a>
<div class="dropdown-menu dropdown-list dropdown-menu-right pullDown">
<div class="dropdown-header">
Messages
<div class="float-right">
<a href="#">Mark All As Read</a>
</div>
</div>
<div class="dropdown-list-content dropdown-list-message">
<a href="#" class="dropdown-item"> <span class="dropdown-item-avatar
text-white"> <img alt="image" src="<?PHP echo base_url(); ?>assets/img/users/user-1.png" class="rounded-circle">
</span> <span class="dropdown-item-desc"> <span class="message-user">John
Deo</span>
<span class="time messege-text">Please check your mail !!</span>
<span class="time">2 Min Ago</span>
</span>
</a> <a href="#" class="dropdown-item"> <span class="dropdown-item-avatar text-white">
<img alt="image" src="<?PHP echo base_url(); ?>assets/img/users/user-2.png" class="rounded-circle">
</span> <span class="dropdown-item-desc"> <span class="message-user">Sarah
Smith</span> <span class="time messege-text">Request for leave
application</span>
<span class="time">5 Min Ago</span>
</span>
</a> <a href="#" class="dropdown-item"> <span class="dropdown-item-avatar text-white">
<img alt="image" src="<?PHP echo base_url(); ?>assets/img/users/user-5.png" class="rounded-circle">
</span> <span class="dropdown-item-desc"> <span class="message-user">Jacob
Ryan</span> <span class="time messege-text">Your payment invoice is
generated.</span> <span class="time">12 Min Ago</span>
</span>
</a> <a href="#" class="dropdown-item"> <span class="dropdown-item-avatar text-white">
<img alt="image" src="<?PHP echo base_url(); ?>assets/img/users/user-4.png" class="rounded-circle">
</span> <span class="dropdown-item-desc"> <span class="message-user">Lina
Smith</span> <span class="time messege-text">hii John,I have upload
doc
related to task.</span> <span class="time">30
Min Ago</span>
</span>
</a> <a href="#" class="dropdown-item"> <span class="dropdown-item-avatar text-white">
<img alt="image" src="<?PHP echo base_url(); ?>assets/img/users/user-3.png" class="rounded-circle">
</span> <span class="dropdown-item-desc"> <span class="message-user">Jalpa
Joshi</span> <span class="time messege-text">Please do as specify.
Let me
kNow if you have any query.</span> <span class="time">1
Days Ago</span>
</span>
</a> <a href="#" class="dropdown-item"> <span class="dropdown-item-avatar text-white">
<img alt="image" src="<?PHP echo base_url(); ?>assets/img/users/user-2.png" class="rounded-circle">
</span> <span class="dropdown-item-desc"> <span class="message-user">Sarah
Smith</span> <span class="time messege-text">Client Requirements</span>
<span class="time">2 Days Ago</span>
</span>
</a>
</div>
<div class="dropdown-footer text-center">
<a href="#">View All <i class="fas fa-chevron-right"></i></a>
</div>
</div>
</li>
<li class="dropdown dropdown-list-toggle"><a href="#" data-toggle="dropdown"
class="nav-link notification-toggle nav-link-lg"><i data-feather="bell"></i>
<span class="badge headerBadge2">
3 </span> </a>
<div class="dropdown-menu dropdown-list dropdown-menu-right pullDown">
<div class="dropdown-header">
Notifications
<div class="float-right">
<a href="#">Mark All As Read</a>
</div>
</div>
<div class="dropdown-list-content dropdown-list-icons">
<a href="#" class="dropdown-item dropdown-item-unread"> <span
class="dropdown-item-icon bg-primary text-white"> <i class="fas
fa-code"></i>
</span> <span class="dropdown-item-desc"> Template update is
available Now! <span class="time">2 Min
Ago</span>
</span>
</a> <a href="#" class="dropdown-item"> <span class="dropdown-item-icon bg-info text-white"> <i class="far
fa-user"></i>
</span> <span class="dropdown-item-desc"> <b>You</b> and <b>Dedik
Sugiharto</b> are Now friends <span class="time">10 Hours
Ago</span>
</span>
</a> <a href="#" class="dropdown-item"> <span class="dropdown-item-icon bg-success text-white"> <i
class="fas
fa-check"></i>
</span> <span class="dropdown-item-desc"> <b>Kusnaedi</b> has
moved task <b>Fix bug header</b> to <b>Done</b> <span class="time">12
Hours
Ago</span>
</span>
</a> <a href="#" class="dropdown-item"> <span class="dropdown-item-icon bg-danger text-white"> <i
class="fas fa-exclamation-triangle"></i>
</span> <span class="dropdown-item-desc"> Low disk space. Let's
clean it! <span class="time">17 Hours Ago</span>
</span>
</a> <a href="#" class="dropdown-item"> <span class="dropdown-item-icon bg-info text-white"> <i class="fas
fa-bell"></i>
</span> <span class="dropdown-item-desc"> Welcome to Aegis
template! <span class="time">Yesterday</span>
</span>
</a>
</div>
<div class="dropdown-footer text-center">
<a href="#">View All <i class="fas fa-chevron-right"></i></a>
</div>
</div>
</li>
<li class="dropdown"><a href="#" data-toggle="dropdown"
class="nav-link dropdown-toggle nav-link-lg nav-link-user"> <img alt="image" src="<?PHP echo base_url(); ?>assets/img/user.png"
class="user-img-radious-style"> <span class="d-sm-none d-lg-inline-block"></span></a>
<div class="dropdown-menu dropdown-menu-right pullDown">
<div class="dropdown-title">Hello Sarah Smith</div>
<a href="profile.html" class="dropdown-item has-icon"> <i class="far
fa-user"></i> Profile
</a> <a href="timeline.html" class="dropdown-item has-icon"> <i class="fas fa-bolt"></i>
Activities
</a> <a href="#" class="dropdown-item has-icon"> <i class="fas fa-cog"></i>
Settings
</a>
<div class="dropdown-divider"></div>
<a href="auth-login.html" class="dropdown-item has-icon text-danger"> <i class="fas fa-sign-out-alt"></i>
logout
</a>
</div>
</li>
</ul>
</nav>
如您所见,有两个未封闭的div和body和html标签。它在页脚文件中关闭了。
解决方法
我的方法是手动关闭div标签,建议您编写标准的HTML代码