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#? ...
随机推荐
- [oeasy]教您玩转linux0001 - 先跑起来 🥊
Python 什么是 Python? Python 很好用 适合初学者 而且在各个领域都很强大 添加图片注释,不超过 140 字(可选) 后来居上 下图可以点开 添加图片注 ...
- Visual Studio 必备插件集合:AI 助力开发
一.前言 2024年AI浪潮席卷全球,编程界迎来全新的挑战与机遇.智能编程.自动化测试.代码审查,这一切都得益于AI技术的迅猛发展,它正在重塑开发者的日常,让编写代码变得更加高效.智能. 精选出最受 ...
- [NOIP2008 提高组] 笨小猴(洛谷题号P1125)
[NOIP2008 提高组] 笨小猴 题目描述 笨小猴的词汇量很小,所以每次做英语选择题的时候都很头疼.但是他找到了一种方法,经试验证明,用这种方法去选择选项的时候选对的几率非常大! 这种方法的具体描 ...
- 一款.NET开源、跨平台的DASH/HLS/MSS下载工具
前言 今天大姚给大家分享一款.NET开源(MIT License).免费.跨平台的DASH/HLS/MSS下载工具,并且支持点播和直播(DASH/HLS)的内容下载:N_m3u8DL-RE. 网络流媒 ...
- 使用git(ee的一个小总结
我先把后端项目推进了gitee,后面为了方便又想把前端也放在同一个项目里,结果出问题了: 一开始是因为前端项目内包含了.git的文件(这个玩意还是隐藏文件,就是你在idea里其实是看不到他的),导致只 ...
- 【SpringCloud】Re03 Feign
Feign是一个声明式的HttpClient?更简洁的实现Http请求发送 安装Feign组件: 配置Feign的依赖坐标: <?xml version="1.0" enco ...
- Win11、Win10局域网共享文件报错:共享文件夹出现,您的账号已锁定,无法访问
解决方法,见: https://blog.csdn.net/dengww_/article/details/133887598 解决方法: https://blog.csdn.net/dengww_/ ...
- Webots —— 好用的人形机器人仿真平台
相关: https://cyberbotics.com/doc/guide/tutorials 下载地址: https://github.com/cyberbotics/webots/releases ...
- CPU利用率为多少时可以兼顾计算效率和时间效率?—— 75% —— 科学计算时如何正确的使用超线程CPU——使用超线程CPU进行计算密集型任务时的注意事项
2023年12月28日 更新 现在这个AI火热的时代科学计算任务占比越来越大,但是平时使用时也有一些不为人注意的地方需要知道,本文就讨论一下使用超线程CPU时的注意事项. 超线程CPU就是现在的多线 ...
- 《最新出炉》系列初窥篇-Python+Playwright自动化测试-64 - Canvas和SVG元素推拽
1.简介 今天宏哥分享的在实际测试工作中很少遇到,比较生僻,如果突然遇到我们可能会脑大.懵逼,一时之间不知道怎么办?所以宏哥这里提供一种思路供大家学习和参考. 2.SVG简介 svg也是html5新增 ...