嗨,伙计们,我正在尝试重新调整像This这样的倾斜div 但我似乎无法让图片显示出来:
HTML:
<div class="headerLine">
</div>
的CSS:
.headerLine{
position: relative;
width: 100%;
overflow: hidden;
height:100%;
background-image: url("../Images/back1.jpg");
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
.headerLine:after{
content: "";
position: absolute;
z-index: 1;
pointer-events: none;
bottom: 0;
left: 0;
width: 100%;
/* background: url(../images/sliderL.png) center center no-repeat; */
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
border-bottom: 150px solid white;
border-left: 3000px solid transparent;
}
任何关于创建一个倾斜的div的帮助就像上面发布的例子一样,第一个div很棒
答案 0 :(得分:1)
此问题在div中为# standard
import tensorflow as tf
import numpy as np
from sklearn.preprocessing import LabelBinarizer
sess = tf.Session()
# one-hot vector encoding labels
l = LabelBinarizer()
l.fit(['a','b','c'])
# input tensor
t = tf.constant(l.transform(['a','a','c','b', 'a']))
# find the indices where 'c' is label
# ***THIS WORKS***
np.all(t.eval(session = sess) == l.transform(['c']), axis = 1)
# We need to do everything in tensorflow and then wrap in Lambda layer for keras so...
from keras import backend as K
# ***THIS DOES NOT WORK***
K.all(t.eval(session = sess) == l.transform(['c']), axis = 1)
# go on from here to get smaller subset of vectors from another tensor with the indicies given by `tf.gather`
。它是该元素的父元素,那么父母的高度设置为什么?如果未设置为任何内容,则浏览器无需引用。
您可以使用vh(查看高度)解决此问题。
答案 1 :(得分:0)
正如你所提到的那样背景没有显示,我得到的原因是你没有在div中放置任何内容,所以会出现一些背景。
您可以放置一些内容,也可以使用一些静态高度,如100vh。
[SEE THE EXAMPLE][1]
[1]: https://codepen.io/hardenrahul/pen/NaLeNv