我的代码使用此代码
<iframe width="100%" height="100%" src="https://www.youtube.com/embed/vodID" title="VOD" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
和此代码
@font-face {
font-family: 'font name';
font-style: normal;
font-weight: 300;
src: url(./fonts/file location) format('woff2'),
url(./fonts/file location) format('woff'),
url(./fonts/file location) format('opentype');}
此代码花费很长的加载时间(在webpagetest.org中)
我该如何改善?
答案 0 :(得分:0)
webpagetest说什么?
您可以为YouTube添加预取信息以提供帮助。这是一篇有关meta pre-stuff enter image description here的精彩文章。
import matplotlib.pylab as pylab
from scipy.integrate import odeint
from pylab import plot, xlabel, ylabel, title, legend, figure, subplot
from pylab import cos, pi, arange, sqrt, array
def MassSpringDamper(state1,state2,t):
k1=124e3 # spring constant, kN/m
k2=50e3
m1=10 # mass, Kg
m2=20
c1=5 # damping coefficient
c2=3
# unpack the state vector
x1,x1d = state1
x2,x2d = state2 # displacement,x and velocity x'
g = 9.8 # metres per second**2
x1dd = (c1+c2)/m1*x1d-c2/m1*x2d+(k1+k2)/m1*x1-k2/m1*x2-g
x2dd = -c2/m2*x1d+c2/m2*x2d-k2/m2*x1+k2/m2*x2-g
return [x1d, x1dd, x2d, x2dd]
state0 = [0.0, 1.2] # initial conditions [x0 , v0] [m, m/sec]
ti = 0.0 # initial time
tf = 4.0 # final time
step = 0.001 # step
t = arange(ti, tf, step)
state1 = odeint(MassSpringDamper, state0, t)
state2 = odeint(MassSpringDamper, state0, t)
x1 = array(state1[:,[0]])
x1d = array(state1[:,[1]])
x2 = array(state2[:,[0]])
x2d = array(state2[:,[1]])
关于字体(我不确定这里的知识),但是也许您设置了“错误的设置,这意味着您包括了不需要的其他字符。根据许可证的不同,您可以选择字体并进行清洁它是由不必要的字符组成的,但这很讨厌您实际上不必这样做。