css - 我如何才能像隐藏我的信的软端一样?

标签 css

My Form

我怎样才能像一个隐藏我的字母的软端一样(“D”就像被截断了;我想要它像渐变一样)

谢谢:D

编辑:

HTML:

<form action="" method="GET" class="buscar_form">
    <input type="text" name="buscar" id="buscar_form_input_text">
</form>

最佳答案

.test {
  background-color: rgb(102, 51, 153);
  padding: 20px;
  font-size: 2em;
  color: white;
  font-family: sans-serif;
  position: relative;
}



.test:after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  background-image: linear-gradient(90deg , rgb(102, 51, 153) 20px, rgba(102, 51, 153, 0));
  width: 10%;
}
<div class='test'> lorem ipsum </div>

关于css - 我如何才能像隐藏我的信的软端一样?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42040841/

相关文章:

html - 如何根据h标签的宽度设置p标签的宽度

javascript - 当我有 2 个模态时,如何在 Bootstrap 中关闭模态(弹出屏幕)

html - 向标题标签添加类或 ID 是好习惯吗?

java - 在移动浏览器中打开时,html 页面顶部的文件名和图标会缩水?

html - 如何让 <ul> 元素居中?

css - 带有 "Comfortaa"Google 字体的占位符文本被截断

javascript - javascript中的彩色到灰度循环

html - 使用 dompdf (CSS) 将 html 固定为 pdf

html - 标签上的相对位置问题

css - capybara 元素未找到错误,即使该元素存在