当前位置:网站首页>Writing of head and bottom components of non routing components
Writing of head and bottom components of non routing components
2022-07-02 23:22:00 【youhebuke225】
List of articles
Please refer to Click on
Catalog

styles file
common.less
@theme-black: #000;
// size
@min-font-size: 12px;
// Color
@bg-color-gray: #eaeaea;
// Border color
@border-gray: #b3aeae;
@boder-gray-footer: #e4e1e1;
@border-input: #ea4a36;
// The font color
@font-white: #fff;
@font-gray: #666;
extends.less
// Files dedicated to inheritance .overflow-ellipsis{
// On which label is the text , Which tag should have this attribute , The premise is that there must be width
display: inline-block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
word-break:break-all;
}
mixins.less
// Layout processing
.flex-row-between(@flag:false) {
// @flag Whether to center vertically display: flex;
flex-direction: row;
justify-content: space-between;
align-items: if(@flag, center, stretch);
}
.flex-row-center(@flag:false){
// @flag Whether to center vertically display: flex;
flex-direction: row;
justify-content: center;
align-items: if(@flag, center, stretch);
}
// Border processing
.border-1px-switch(top, @border-color,@size: 1px) {
border-top: @size solid @border-color;
}
.border-1px-switch(bottom, @border-color, @size: 1px) {
border-bottom: @size solid @border-color;
}
.border-1px-switch(left, @border-color, @size: 1px) {
border-left: @size solid @border-color;
}
.border-1px-switch(right, @border-color, @size: 1px) {
border-right: @size solid @border-color;
}
.border-1px(@border-color, @size: 1px) {
border: @size solid @border-color;
}
Head assembly
Header.vue
<script setup lang="ts"> </script>
<template>
<header>
<section class="top-tip">
<!-- first line , Log in to register http://sph-order.atguigu.cn/myOrder.html-->
<div class="login">
<span> Welcome to shangpinhui ! </span>
<a href="javascript:;" class="login-btn" title=" Please log in "> Please log in </a>
<a href="javascript:;"> Free registration </a>
</div>
<div class="menu-list">
<!-- Description of empty connection https://blog.csdn.net/micr_cai/article/details/124597435 -->
<a class="no-border" href="javascript:;"> My order </a>
<a href="javascript:;"> My shopping cart </a>
<a href="javascript:;"> My shangpinhui </a>
<a href="javascript:;"> Enterprise procurement </a>
<a href="javascript:;"> Pay attention to shangpinhui </a>
<a href="javascript:;"> Audience shangpinhui </a>
<a href="javascript:;"> Business background </a>
</div>
</section>
<section class="search">
<!-- The second line , Search box icon, etc -->
<div class="logo">
<img src="./images/logo.png" alt="logo">
</div>
<div class="search-input">
<input type="text">
<button> Search for </button>
</div>
</section>
</header>
</template>
<style scoped lang="less"> @import "@/styles/mixins.less"; @import "@/styles/common.less"; @import "@/styles/extends.less"; @right: right; @link-padding: 8px; // Control the interval of the total vertical line of the first gray background @input-height: 32px; // The overall height of the search box .top-tip {
.flex-row-between(true); height: 30px; font-size: @min-font-size; color: @font-gray; padding: 0 50px; background-color: @bg-color-gray; .login {
.login-btn:extend(.overflow-ellipsis){
// Display the account name after login , Overflow display ellipsis max-width: 100px; } a {
padding: 0 @link-padding; &:hover {
text-decoration: underline; } &:nth-child(2) {
.border-1px-switch(@right; @border-gray); } } } .menu-list {
a {
padding: 0 @link-padding; &:hover {
text-decoration: underline; } &:not(.no-border) {
.border-1px-switch(left, @border-gray); } } } } .search {
.flex-row-between(true); height: 100px; padding: 0 100px; .logo {
display: block; width: 175px; } .search-input {
.flex-row-between(false); input {
width: 450px; height: @input-height; border: 2px solid @border-input; box-sizing: border-box; padding: 0px 10px; } button {
width: 68px; background-color: @border-input; font-size: @min-font-size; height: @input-height; box-sizing: border-box; color: @font-white; cursor: pointer; } } } </style>
Bottom assembly
Footer.vue
<script setup lang="ts"> const listData = [ {
name: " Shopping Directory ", list: [" Shopping process ", " Member introduction ", " Life Travel / Group purchase ", " common problem ", " Shopping Directory "] }, {
name: " Delivery method ", list: [" Bring it to your door ", "211 Limited time ", " Delivery service query ", " Delivery fee charging standard ", " Overseas delivery "] }, {
name: " Method of payment ", list: [" Cash on Delivery ", " Pay online ", " hire purchase ", " Post office remittance ", " Company transfer "] }, {
name: " After-sales service ", list: [" After sales policy ", " Price protection ", " Refund instructions ", " Rework / Return and exchange ", " Cancellation of order "] }, {
name: " Featured services ", list: [" Treasure Island ", "DIY Install ", " Extended service ", " Shangpinhui E card ", " Shangpinhui communication "] } ] </script>
<template>
<footer>
<section class="menu-list">
<!-- The repeated data is traversed -->
<div class="menu-section" v-for="_data in listData">
<h3 class="menu-header">{
{ _data.name }}</h3>
<ul v-for="_item in _data.list">
<li>{
{ _item }}</li>
</ul>
</div>
<!-- The last picture -->
<div class="menu-section">
<h3 class="menu-header"> Help center </h3>
<img src="./images/nvdi.webp" alt="help">
</div>
</section>
<section class="other-info">
<ul class="link-list">
<li> About us </li>
<li> Contact us </li>
<li> Business check in </li>
<li> Marketing center </li>
<li> link </li>
<li> About us </li>
<li> Contact us </li>
<li> Business check in </li>
<li> Marketing center </li>
<li> link </li>
</ul>
<div class="address"> Address : Changping District, Beijing </div>
<div class="auth"> Beijing ICP To prepare 19006430 Number </div>
</section>
</footer>
</template>
<style scoped lang="less"> @import "@/styles/mixins.less"; @import "@/styles/common.less"; @import "@/styles/extends.less"; footer {
background-color: @bg-color-gray; padding: 30px; .menu-list {
.flex-row-between(); .border-1px-switch(top, @boder-gray-footer); .border-1px-switch(bottom, @boder-gray-footer); padding-bottom: 30px; .menu-section {
margin-right: 100px; } .menu-header {
font-weight: bold; margin-bottom: 5px; } ul {
li {
padding: 2px 0; font-size: @min-font-size; } } img {
margin-top: 5px; width: 100px; height: 100px; } } .other-info {
font-size: @min-font-size; margin-top: 20px; .link-list {
.flex-row-center(); li {
padding: 0 10px; &:not(:last-child) {
.border-1px-switch(right, @theme-black) } } } .address, .auth {
text-align: center; margin-top: 20px; } } } </style>
App.vue
<script setup lang="ts"> import Header from "@/components/Header/Header.vue" import Footer from "@/components/Footer/Footer.vue" </script>
<template>
<Header/>
<div id="box">Hello World</div>
<Footer/>
</template>
<style lang="less"> #app {
width: 100%; height: 100%; } </style>
effect

边栏推荐
- Editor Caton
- Pandora IOT development board learning (HAL Library) - Experiment 4 serial port communication experiment (learning notes)
- Go project operation method
- What can I do after buying a domain name?
- Troubleshooting the cause of the crash when STM32 serial port dam receives 253 bytes
- 万物并作,吾以观复|OceanBase 政企行业实践
- 深度剖析数据在内存中的存储----C语言篇
- Li Kou brush questions (2022-6-28)
- 面试过了,起薪16k
- "A good programmer is worth five ordinary programmers!"
猜你喜欢

YOLOX加强特征提取网络Panet分析

How does win11 turn on visual control? Win11 method of turning on visual control

设置单击右键可以选择用VS Code打开文件

"A good programmer is worth five ordinary programmers!"

(毒刺)利用Pystinger Socks4上线不出网主机

CDN acceleration requires the domain name to be filed first

数字图像处理实验目录

Set right click to select vs code to open the file

Alibaba cloud award winning experience: how to use polardb-x

Three solutions to frequent sticking and no response of explorer in win11 system
随机推荐
Redis 过期策略+conf 记录
ServletContext learning diary 1
海思调用接口之Makefile配置
Win11自动关机设置在哪?Win11设置自动关机的两种方法
跨境电商如何通过打好数据底座,实现低成本稳步增长
Configuration clic droit pour choisir d'ouvrir le fichier avec vs Code
Win11如何开启目视控制?Win11开启目视控制的方法
@BindsInstance在Dagger2中怎么使用
SharedPreferences save list < bean > to local and solve com google. gson. internal. Linkedtreemap cannot be cast to exception
基于Pyqt5工具栏按钮可实现界面切换-1
内网渗透 | 手把手教你如何进行内网渗透
[npuctf2020]ezlogin XPath injection
20220527_ Database process_ Statement retention
用matlab调用vs2015来编译vs工程
(stinger) use pystinger Socks4 to go online and not go out of the network host
【Redis笔记】压缩列表(ziplist)
深度剖析数据在内存中的存储----C语言篇
基于Pyqt5工具栏按钮可实现界面切换-2
2016. maximum difference between incremental elements
4 special cases! Schools in area a adopt the re examination score line in area B!