小编Dan*_*iel的帖子

水平锋利的背景渐变与特定长度的第一种颜色

我已经看到在纯CSS中创建的垂直列有这样的东西:

div {
  height: 300px;
  background: linear-gradient(to right, #a2ea4c 200px, #07aa91 200px, #07aa91);
}
Run Code Online (Sandbox Code Playgroud)
<div></div>
Run Code Online (Sandbox Code Playgroud)

是否有可能以与上述类似的方式制作固定大小水平标题,即仅使用CSS?

**编辑**

以下是我正在尝试做的最小例子.我不想在html标签上设置背景渐变,以便在页面的顶部和底部有不同的过卷颜色,中间有可变的,有时是透明的内容.使用可变内容填充页面时,渐变会使用第一种颜色完全填充页面.如下例所示.

html {
    background: linear-gradient(to bottom, #a2ea4c 200px, #07aa91 200px, #07aa91);
}

div {
  height: 300px;
  width: 20%;
  margin: 0 auto;
  background: teal;
}
Run Code Online (Sandbox Code Playgroud)
<html>
  <body>
    <p> Lorem ipsum sit amet</p>
  </body>
</html>
Run Code Online (Sandbox Code Playgroud)

(如果切换div标签的p-tag,您将看到渐变按预期工作)

css linear-gradients css3

5
推荐指数
1
解决办法
3283
查看次数

git log format:将提交体X列向右移

我使用以下自定义日志格式来查看我的提交:

命令: git log --pretty=format:"%C(auto)%h %<(8,trunc)%aN %Cgreen%s %+b"

3758d35 Daniel   This commit does nothing 
You really should remove it before commiting.

    1. This is a line
    2. This is another line

a191c2b Daniel   Viral helvetica lomo, typewriter fashion axe 
814a6a9 John     Umami pork belly pickled, fanny pack yr keffiyeh fap YOLO
d5e130e Daniel   Cardigan raw denim banjo
f7107d8 Daniel   90's ramps pinterest, craft beer blue bottle
Run Code Online (Sandbox Code Playgroud)

除了我希望提交体与提交标题一致之外,它的效果很好.是否有可能只使用git?

git format

3
推荐指数
1
解决办法
1116
查看次数

标签 统计

css ×1

css3 ×1

format ×1

git ×1

linear-gradients ×1