Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

标题样式的细节设计 #2462

Open
iSmartSV opened this issue Dec 11, 2023 · 2 comments
Open

标题样式的细节设计 #2462

iSmartSV opened this issue Dec 11, 2023 · 2 comments

Comments

@iSmartSV
Copy link

iSmartSV commented Dec 11, 2023

image

vnote 似乎<h1>~<h6>标签没有在内部嵌套<span>标签,也就无法实现上面这种【只给标题文字部分】添加样式的操作。
操作的方式为,在css中使用:h1 span{key: value;......}。
大佬有没有折腾一下的冲动?

@tamlok
Copy link
Member

tamlok commented Dec 13, 2023

这种操作在web里面常见吗?

@iSmartSV
Copy link
Author

iSmartSV commented Dec 13, 2023

这种操作在web里面常见吗?

应该至少可以说不少见吧。
我了解到的是只有这种方式可以只修改内容部分,同时不影响外部标签。
修改某个标签中的内容或者内容的一部分也不是什么奇怪的需求。

<h1>
  这是一个示例标题 <span class="special-text">特殊文本</span>
</h1>

Typora就用了这种方式。
这是Typora主题orangeheartmonokai的部分代码。上面那个案例就是这个主题<h2>标签的效果。
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants