如何在css中用一种颜色绘制一半的对角线,并用另一种导航条绘制另一半

时间:2018-06-30 13:43:22

标签: css css3 css-shapes

我将Bootstrap与CSS和Java脚本结合使用。 在不影响前端代码的情况下,我很难在CSS中绘制此背景。在许多问题中,人们将宽度和高度设置为0%。但是由于导航栏,我无法使用这种样式方法。我非常想知道如何在透明视图中附加我的徽标作为品牌名称。下面的这张图清楚地显示了我正在尝试做的事情:

enter image description here

1 个答案:

答案 0 :(得分:2)

只需使用gradient

from gensim.models import KeyedVectors
word_vectors = KeyedVectors.load_word2vec_format('path/to/word2vec-format.txt', binary=False)
.header {
  height:80px;
  background:linear-gradient(to bottom left,blue 49%,transparent 51%);
}