css的知识:@media screen and ....

在这里的代码都是针对屏幕宽度做自动判断的,一般的几个media实际只会生效其中的一个

eg:@media sreen and (max_width:769px)and (min-width:481px)

.pdp-hero.hero-content-box.right-align{

texr-align:right;

display:table-cell;

vertical-align:middle;

float:none;

}

@medis screen and (max-width:769px)and(max-width:481px)

.pdp-hero .hero-content-box .right-align{

text-align:right;

disply:table-cell;

vertical-align:middle;

float:none;

 

}

(2)区别getElementByID,getElementsByName,getElementsByTagName

以人来举例说明,人有能标识身份的身份证,有姓名,有类别(大人,小孩,老人)等

1.ID是一个人的身份证号码,是唯一的。所以通过etElementByID获取的是指定的一个人

2. Name 是他的名字,可以重复。所以通过getElementsByName获取名字相同的人集合。

3. TagName可看似某类,getElementsByTagName获取相同类的人集合。如获取小孩这类人,getElementsByTagName("小孩")。

eg:把上面的列子转换到HTML中,如下:

<input type="checkbox" name="hobby" id="hobby1">  音乐

input标签就像人的类别。

name属性就像人的姓名。

id属性就像人的身份证

(3)在html中加载的连接没有直接指向视频文件怎么解决

用一段类似flash代码

<embed width="100%" height="100%" name="plugin" id="plugin" src="https://imgcache.qq.com/tencentvideo_v1/playerv3/TPout.swf?max_age=86400&amp;v=20161117&amp;vid=g0342l5ide3&amp;auto=0" type="application/x-shockwave-flash">

posted on 2017-03-15 14:15  光之九月天  阅读(276)  评论(0编辑  收藏  举报