跳至主要內容
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?

4563博客

全新的繁體中文 WordPress 網站
  • 首頁
  • 超有意思的 html 頁面
未分類
7 10 月 2020

超有意思的 html 頁面

超有意思的 html 頁面

資深大佬 : honk 3

https://secretgeek.github.io/html_wysiwyg/html.html

大佬有話說 (17)

  • 資深大佬 : ashine

    没发现哪里特别的,不就是几个 css 的特性吗

  • 資深大佬 : wanacry

    有意思的点在哪?

  • 資深大佬 : opengps

    谁解读下用法,html 代码可见但是却不影响只选中文本,我是第一次见

  • 資深大佬 : JmmBite

    “`css
    html::before {content:'<html>’}
    html::after {content:'</html>’}
    head::before {content:'<head>’}
    head::after {content:'</head>’}
    title::before {content:'<title>’}
    title::after {content:'</title>’}
    body::before {content:'<body>’}
    body::after {content:'</body>’}
    h1::before {content:'<h1>’}
    h1::after {content:'</h1>’}
    h2::before {content:'<h2>’}
    h2::after {content:'</h2>’}
    p::before {content:'<p>’}
    p::after {content:'</p>’}
    pre::before {content:'<pre>’}
    pre::after {content:'</pre>’}
    code::before {content:'<code>’}
    code::after {content:'</code>’}
    a::before {content:'<a>’}
    a::after {content:'</a>’}
    aside::before {content:'<aside>’}
    aside::after {content:'</aside>’}
    blockquote::before {content:'<blockquote>’}
    blockquote::after {content:'</blockquote>’}
    em::before {content:'<em>’}
    em::after {content:'</em>’}
    strong::before {content:'<strong>’}
    strong::after {content:'</strong>’}
    “`

  • 資深大佬 : xycool

    @opengps #3 套娃用法,仔细查看一个标签的样式就能发现,比如:
    “`h1::before {content:'<h1>’}
    h1::after {content:'</h1>’}“`

  • 資深大佬 : finian

    有意思的地方就是源码和展示的内容是一样的

  • 資深大佬 : yuzo555

    用 CSS 的 content 属性实现在常见元素的 before 和 after 加上文字开关;
    (@opengps 而 content 属性显示内容是无法被选中的)

    然后给 * 所有元素加上 display:block,这样就实现了 <body> 内部的 <style> 内部内容也能显示出来。

  • 資深大佬 : des

    这不算有意思吧,来看看这个? sojo.im

  • 主 資深大佬 : honk

    @des 闪瞎了我的眼

  • 資深大佬 : martinsu

    @des Edge 提示风险

  • 資深大佬 : kaiki

    可惜 link 用的 attr,实际上是在 css 里面把这个 link 重写了一遍

  • 資深大佬 : sinv

    @des Hacked by RR

  • 資深大佬 : Mutoo

    我的主页也是类似的效果,只不过是 javascript 实现: https://mutoo.im

  • 資深大佬 : abcdabcd987

    https://news.ycombinator.com/item?id=24824977

  • 資深大佬 : Ritter

    菜狗有个问题 这样每个标签前后都加 before after 不累吗 还是有工具可以批量生成

  • 主 資深大佬 : honk

    @Ritter 只是 CSS 特性的取巧式利用。
    真实项目不可能这样用的

  • 資深大佬 : gxgxxn

    http://cnm.buhuibaidu.me/

文章導覽

上一篇文章
下一篇文章

AD

其他操作

  • 登入
  • 訂閱網站內容的資訊提供
  • 訂閱留言的資訊提供
  • WordPress.org 台灣繁體中文

51la

4563博客

全新的繁體中文 WordPress 網站
返回頂端
本站採用 WordPress 建置 | 佈景主題採用 GretaThemes 所設計的 Memory
4563博客
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?
在這裡新增小工具