我有两个import tensorflow as tf
v = [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0]
n = len(v)
a = tf.Variable(v, name = 'a',dtype=tf.float32)
def cond(i, a):
return i < n
def body(i, a1):
e = tf.eye(n,n)[i]
a1 = a1 + e *(a1[i-1] + a1[i-2])
return i + 1, a1
i, b = tf.while_loop(cond, body, [2, a])
with tf.Session() as sess:
sess.run(tf.global_variables_initializer())
print('i: ',sess.run(i))
print('b: ',sess.run(b))
,分别包含文本和SVG。
问题是基于内部内容,这两个div
具有不同的垂直位置(前者与文本的偏移比后者大)。
如果我将div
属性设置为overflow
,则问题得到纠正。
为什么hidden
状态会影响overflow
的最高位置?
div
.tablets {
display: inline-block;
/* overflow:hidden;*/
position: relative;
width: 105px;
height: 45px;
border: 1px solid #116476;
border-radius: 8px;
padding: 8px;
margin-left: 8px;
background-color: #ddd;
text-align: center;
font-size: 30px;
}