ImageVerifierCode 换一换
格式:DOCX , 页数:24 ,大小:201.28KB ,
资源ID:6130685      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/6130685.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(html和css.docx)为本站会员(b****6)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

html和css.docx

1、html和cssposition:absolute.position:relative 相对定位.1. 从原来的位置开始偏移.2. 相对定位的内容也会漂浮起来。但是还会占着原来的位置。如下无标题文档 div width:100px; height:100px; .d1 background-color:#FF0000; .d2 background-color:#00FF00; position:relative; top:20px; left:20px; .d3 background-color:#FFFF00; 1 2 3 position:fixed , 将内容固定住,同时也会漂浮起来。

2、无标题文档 div width:100px; height:100px; .d1 background-color:#FF0000; .d2 background-color:#00FF00; position:fixed; top:20px; left:20px; .d3 background-color:#FFFF00; 1 关闭 3 margin属性,控制容器的外边据. 被加上margin属性的容器不会漂浮,所以移动后,会将其它内容排开。无标题文档 div width:100px; height:100px; float:left; .d1 background-color:#FF000

3、0; .d2 background-color:#00FF00; margin-left:10px; .d3 background-color:#FFFF00; 1 2 3 Margin是margin-left、margin-right、margin-top、margin-bottom的综合。Margin的取值顺序为 :上 右 下 左。并且当这四个值一样时,可以简写为一个:无标题文档 div width:100px; height:100px; float:left; .d1 background-color:#FF0000; .d2 background-color:#00FF00; mar

4、gin:20px; .d3 background-color:#FFFF00; 1 2 3 当margin取值为auto时,容器会水平居中:无标题文档 div width:100px; height:100px; .d1 background-color:#FF0000; .d2 background-color:#00FF00; margin:auto; .d3 background-color:#FFFF00; 1 2 3 Padding控制内遍距。无标题文档 div width:100px; height:100px; .d1 background-color:#FF0000; .d2

5、background-color:#00FF00; padding:15px; .d3 background-color:#FFFF00; 1 2 3 在网页上,尽量不要使用alert. 因为alert需要让用户点击一下,对用户体验不好。 我们自己给自己制作一个工具,以后凡是要用到alert的地方,就用这个工具。(这叫做封装。)方法一:无标题文档加入购物车 function showMsg(msg,w,h) var elt = document.createElement(div); elt.id=msg; elt.style.border=solid black 5px; elt.style

6、.backgroundColor=yellow; elt.style.width=w+px; elt.style.height=h+px; elt.innerHTML=msg; elt.style.textAlign=center; elt.style.lineHeight=h+px; elt.style.fontSize=30px; elt.style.fontWeight=bold; elt.style.position=absolute; elt.style.top=200+px; elt.style.left=(document.body.offsetWidth - w)/2+px;

7、document.body.appendChild(elt); function shutdown() var msg = document.getElementById(msg); document.body.removeChild(msg); setTimeout(shutdown, 1000); 方法二,让提示框是 震动地。步骤一无标题文档加入购物车 function showMsg(msg,w,h) var elt = document.createElement(div); elt.style.border=solid black 5px; elt.style.backgroundC

8、olor=yellow; elt.style.width=w+px; elt.style.height=h+px; elt.innerHTML=msg; elt.style.textAlign=center; elt.style.lineHeight=h+px; elt.style.fontSize=30px; elt.style.fontWeight=bold; elt.style.position=absolute; elt.style.top=200+px; elt.style.left=(document.body.offsetWidth - w)/2+px; document.bod

9、y.appendChild(elt); var start = new Date(); var A; function animate() var now = new Date(); var last = now - start; elt.style.left = last + px; if(last = 2000) document.body.removeChild(elt); clearInterval(A); A=setInterval(animate, 1); 插播知识点: Math.sin(); 度数有360种,所以sin(度数)的返回值也有360种,以下就是将这360种度数对应的s

10、in返回值输出。观察输出的结果,会发现:范围-1 1之间。不是匀速渐变。方法2:先把上面的sin看懂无标题文档加入购物车 function showMsg(msg,w,h,t) var elt = document.createElement(div); elt.style.border=solid black 5px; elt.style.backgroundColor=yellow; elt.style.width=w+px; elt.style.height=h+px; elt.innerHTML=msg; elt.style.textAlign=center; elt.style.li

11、neHeight=h+px; elt.style.fontSize=30px; elt.style.fontWeight=bold; elt.style.position=absolute; elt.style.top=200+px; elt.style.left=(document.body.offsetWidth - w)/2+px; document.body.appendChild(elt); var start = new Date(); var A; function animate() var now = new Date(); var last = now - start; v

12、ar d = Math.PI/180*50; var jl = Math.sin(last*d) * 10 + (document.body.offsetWidth - w)/2 ; elt.style.left = jl + px; if(last = t) document.body.removeChild(elt); clearInterval(A); A=setInterval(animate, 1); 复习java.1. 7过表驱动式,猜拳游戏。import java.util.Scanner;public class Foo public static void main(Stri

13、ng args) String quan = 剪刀,石头, 布; String jieguo = /刀 石 布 平局,胜利, 失败, / 第一行代表剪刀 失败,平局, 胜利, / 第一行代表石头 胜利,失败, 平局 / 第一行代表布 ; int a,b; /a是电脑(行) b是用户(列)。 a=(int)Math.random()*1000)%3; System.out.println(请出拳: 0 剪刀t1 石头t2 布); Scanner sc = new Scanner(System.in); b=sc.nextInt(); System.out.println(电脑出: + quana

14、); System.out.println(你出: + quanb); System.out.println(结果: + jieguoab); 杨辉三角import java.util.Scanner;public class Foo public static void main(String args) int a = new int1010; for(int i = 0; i a.length; i+) ai0 = 1; aii = 1; for(int i = 2; i a.length; i+) for(int j = 1; j i; j+) aij = ai - 1j + ai - 1j - 1; for(int i = 0; i a.length; i+) for(int j = 0; j = i; j+) System.out.print(aij+t); System.out.println();

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1