css - 响应式、粘性、css 形状,里面有图标,可能吗?

标签 css icons responsive sticky

我为 CSS 三 Angular 形使用了各种代码,但在尝试将文本或图标放入 div 后,它仍然以某种方式被破坏。

下图是用CSS得到的目标。请帮忙。

这可能吗?

enter image description here

最佳答案

试试这个方法:

<div id="container">
  <div id="triangle-bottomleft"></div>
  <div id="smile">🙂</div>
</div>
#container {
  width: 100px;
  height: 100px;
  position: relative;
}

#triangle-bottomleft {
  width: 0;
  height: 0;
  border-bottom: 100px solid red; 
  border-right: 100px solid transparent;
  position: absolute;
  left: 0;
  bottom: 0;
}

#smile {
  position: absolute;
  left: 20%;
  bottom: 20%;
}

codepen

关于css - 响应式、粘性、css 形状,里面有图标,可能吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52861093/

相关文章:

html - Bootstrap 3 网格 : Responsive Position Absolute Bottom Width Issue

html - 使用 Bootstrap 根据屏幕大小显示固定数量的行元素

javascript - Uncaught TypeError : $(. ..).sidr 不是函数[控制台 Chrome 开发者工具]

java - 如何从JDialog中完全删除图标?

CSS3111 : @font-face encountered unknown error” throws for icons created by icomoon app in IE11 when untrusted font blocking is enabled

javascript - 如何在html中制作响应式左侧栏

javascript - jquery文档滚动不触发

javascript - 从 API 获取数据( Angular )

android - 根据打开的 fragment 更改操作栏中的选项菜单图标

jquery - 单击顶部图像,显示模态和另一幅图​​像(在模态后面)