html4,5 basic
更新: 2021-06-15
游览器 href 和 base href 绝对路径和相对路径
在没有 base href 的情况下
href="/about.html" 就是从 domain 开始走起, 算是绝对路径
href="../about.html" 往上走的相对路径
href="./about.html" 往 sibling 走的相对路径
href="detail.html" 往下走的相对路径
有时候 ./ 感觉不灵是因为我们经常用 folder + index.html 所以它看上去是 /about/ 但其实是 /about/index.html, 如果想去 contact 那么就得 ../ 而不是 ./, ./ 只能去到 index.html 的 sibling file (如果是 /about <-- 没有 end with / 就 ok )
有了 base href 之后, 所有相对路径都收到影响. 绝对路径没影响.
本来相对路径是对着当前的 path, 有了 base 之后就对着 base.
https://stackoverflow.com/questions/1889076/what-are-the-recommendations-for-html-base-tag
base href 常用来做 prefix 语言
记入一些偶尔会用到的基础知识.
1. blur mousedown click
比如有一个 input 和一个 button
绑定 input blur, button mousedown, click
首先 focus input 然后点击 button
触发顺序是 button mousedown -> input blur -> button click
如果我们在 input blur 的事件中把 button element remove 掉, 那么 button click 事件就不会触发了.
2. 空格是
<span>a</span>
<span>a</span>
空行自带空格,
html4,5 basic的更多相关文章
- hbuilder中的 http://www.w3.org/TR/html4/loose.dtd
<!-- This is the HTML 4.01 Transitional DTD, which includes presentation attributes and elements ...
- hbuilder中的 http://www.w3.org/TR/html4/strict.dtd
<!-- This is HTML 4.01 Strict DTD, which excludes the presentation attributes and elements that W ...
- Atitit HTTP 认证机制基本验证 (Basic Authentication) 和摘要验证 (Digest Authentication)attilax总结
Atitit HTTP认证机制基本验证 (Basic Authentication) 和摘要验证 (Digest Authentication)attilax总结 1.1. 最广泛使用的是基本验证 ( ...
- Basic Tutorials of Redis(9) -First Edition RedisHelper
After learning the basic opreation of Redis,we should take some time to summarize the usage. And I w ...
- Basic Tutorials of Redis(8) -Transaction
Data play an important part in our project,how can we ensure correctness of the data and prevent the ...
- Basic Tutorials of Redis(7) -Publish and Subscribe
This post is mainly about the publishment and subscription in Redis.I think you may subscribe some o ...
- Basic Tutorials of Redis(6) - List
Redis's List is different from C#'s List,but similar with C#'s LinkedList.Sometimes I confuse with t ...
- Basic Tutorials of Redis(5) - Sorted Set
The last post is mainly about the unsorted set,in this post I will show you the sorted set playing a ...
- Basic Tutorials of Redis(4) -Set
This post will introduce you to some usages of Set in Redis.The Set is a unordered set,it means that ...
- Basic Tutorials of Redis(3) -Hash
When you first saw the name of Hash,what do you think?HashSet,HashTable or other data structs of C#? ...
随机推荐
- XAMPP的mysql启动失败:Plugin ‘FEEDBACK‘ is disabled
安装完XAMPP后启动mysql,发现启动失败也没有任何提示,通过查看mysql_error日志,描述: 2021-08-11 18:56:53 0 [Note] InnoDB: Mutexes an ...
- AT_agc017_b 题解
洛谷链接&Atcoder 链接 本篇题解为此题较简单做法,请放心阅读. 题目简述 一共有 \(n\) 个格子,给定两个整数 \(A,B\) 分别位于第 \(1\) 和第 \(n\) 格,中间有 ...
- ngnix简介和基础
一.Nginx简介 Nginx 是一个高性能的HTTP和反向代理服务器,同时也是一个IMAP/POP3/SMTP代理服务器 是一个模块化软件 [1].安装nginx 使用源码包编译安装 cd /opt ...
- 计算机二级考试 C语言篇
本篇仅适用于计算机二级考试C语言篇 首先介绍一下二级考试时间问题(以本人考试2022年为例): 一. 2022年全国计算机二级考试时间 2022年全国计算机考试举办4次,(3月.5月.9月.12月 ...
- nacos:关于注册服务与配置管理
为什么要用nacos做配置中心? 1.nacos可以做到统一管理,而且在修改时可以做到动态管理,无需重启即可生效. 2.nacos通过namespace进行环境隔离, 约定: namespace:用于 ...
- 【MongoDB】Re01 安装与基础操作
Linux安装 官网下载红帽安装版 #下载三个rpm包 wget https://mirrors.tuna.tsinghua.edu.cn/mongodb/yum/el7-4.2/RPMS/mongo ...
- 【Vue】Re08 模块化
一.JS的演变: 1.简单的页面控制,改变HTML标签和CSS样式 2.AJAX异步请求,控制前后数据传输问题 3.更强大的功能,几乎依赖JS实现 工程管理问题: 简单页面只需要在页面嵌入script ...
- batch normalization的multi-GPU版本该怎么实现? 【Tensorflow 分布式PS/Worker模式下异步更新的情况】
最近由于实验室有了个AI计算平台,于是研究了些分布式和单机多GPU的深度学习代码,于是遇到了下面的讨论: https://www.zhihu.com/question/59321480/answer/ ...
- MAML —— Model-Agnostic Meta-Learning for Fast Adaptation of Deep Networks
论文地址: https://arxiv.org/abs/1703.03400 官方代码: 有监督学习: https://github.com/cbfinn/maml 强化学习: https://git ...
- quartz监控日志(二)添加监听器
上一章介绍监控job有三种方案,其实还有一个简单方案是实现quartz的TriggerListener. 上次我也试了这个方案,但是由于操作错误,导致没有监控成功,所以才选择分析源码来实现代理进行监控 ...