html - 位置符号的 HTML 实体是什么

标签 html css html-entities

我正在设计一个网站,需要一个位置符号,就像 Twitter 上的一样。

enter image description here

如果最终我不得不使用图片,我也可以接受;但是,我更容易将其作为 HTML 实体进行操作。

我想使用它的方式是 <h3>{entity code/image} Scotland</h3>

最佳答案

使用元素创建您自己的图标

h3 {
  display: inline-block;
  padding-left: 30px;
}
h3:after {
  content: '';
  background: red;
  width: 20px;
  height: 20px;
  position: absolute;
  left: 10px;
  border-radius: 50% 50% 50% 0%;
  transform: rotate(-50deg);
}
h3:before {
  content: '';
  background: white;
  width: 8px;
  position: absolute;
  height: 8px;
  left: 16px;
  border-radius: 50%;
  top: 33px;
  z-index: 1;
}
<h3> Scotland</h3>

关于html - 位置符号的 HTML 实体是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27678753/

相关文章:

html - 执行网络编码标准

html - 我无法让 divs 在 firefox 中显示

css - 阻止 div 重叠

javascript - 当值具有 HTML 字符时,按其值选择元素

android - iPad、androidPad 和 Windows 8/HTML 的单一来源?

html - 奇怪的白色东西出现在鼠标悬停 CSS 按钮上

html - 粘性页脚中的链接在 Firefox 和 Chrome 中不可点击

javascript - 使用ajax将参数发送到iframe

php - htmlentities 和 é (e acute)

javascript - 不能在 title 属性中使用 HTML 实体吗?