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#? ...
随机推荐
- [rCore学习笔记 09]为内核支持函数调用
在[[08 内核第一条指令|上一节]]我们使用了编写entry.asm函数中编写了内核的第一条指令,但是我们使用的汇编.这里注意我们仍然是嵌入了这段asm代码到我们的rust代码之中,然后进行编译.但 ...
- 题解:P10537 [APIO2024] 九月
题解:P10537 [APIO2024] 九月 题意 在一个树上,在 \(k\) 天内有 \(n-1\) 个节点掉落,会有 \(m\) 个记录者记录掉落的情况,每一天每一个人会以任意的顺序记录当天的掉 ...
- MFC的消息反射
这边我用对话框来测试mfc的消息反射 当对话框初始化完成之后,点击按钮,首先相应CDialog::OnCommand其中wpARAM(低八位nId,高八位子控件句柄) 和LPARAM(句柄) OnCo ...
- hmall | 引入ES实现高效搜索与同步双写
在gitee.飞书.百度云.B站中,黑马都没有上传该部分资料,以下皆为个人观点,如有纰漏欢迎指正 1.先把item-service中的searchcontroller抽出来,抽到一个模块中并将其设为h ...
- ansible 部署hadoop
规划 ansible 节点 ansible controller 镜像rhel 8.2 镜像ansible hadoop 集群 master slave1 slave2 镜像centos 1810 0 ...
- 用了组合式 (Composition) API 后代码变得更乱了,怎么办?
前言 组合式 (Composition) API 的一大特点是"非常灵活",但也因为非常灵活,每个开发都有自己的想法.加上项目的持续迭代导致我们的代码变得愈发混乱,最终到达无法维护 ...
- 【Java】Collection子接口:其二 Set 组接口
Collection子接口:其二 Set 组接口 - Set接口是Collection的子接口,Set没有提供额外的方法 - Set集合中不允许包含重复的元素,如果重复添加,只保留最新添加的那一个 - ...
- 阿里modelscope下载模型
个人上传的模型地址:(需要注意,这个模型参数只做测试之用,并无实际意义) https://modelscope.cn/models/devilmaycry812839668/devil/summary ...
- 国产操作系统 deepin —— UOS 系统下使用蓝牙音箱或蓝牙耳机不能正常工作
近日搞来了一个国产CPU的电脑,自带系统为UOS,具体可见: https://www.cnblogs.com/devilmaycry812839668/p/14828130.html 忽然发现这个系统 ...
- Cython将Numpy数组转为自定义结构体
技术背景 前面我们写过几篇关于Cython的文章,例如Cython计算谐振势.Cython与C语言的结合.Cython调用CUDA Kernel函数.Cython有着非常Pythonic的编程范式,又 ...