1. HTML5编写的网站,网页浏览能否看到源代码
能;
操作如下:
右键点击对应网页;
选择查看源文件;
2. 1、HTML5网页结构 2、怎么输出HTML5网页的源代码
html5结构:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
</body>
</html>
输出html5网页源码 你直接f12 或者 鼠标右击 查看网页源代码
3. 用html5+js 做一个转盘抽奖怎么做,求源码!
5分给你个程序。。。
自己参考改吧
<input type="button" value="开始旋转" onclick="spin();" style="float: left;" />
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<canvas id="wheelcanvas" width="500" height="500"></canvas>
<script type="application/javascript">
var colors = ["#B8D430", "#3AB745", "#029990", "#3501CB",
"#2E2C75", "#673A7E", "#CC0071", "#F80120",
"#F35B20", "#FB9A00", "#FFCC00", "#FEF200"];
var restaraunts = ["北京", "上海", "天津", "南京",
"杭州", "深圳", "武汉", "济南",
"重庆", "大连", "合肥", "郑洲"];
var startAngle = 0;
var arc = Math.PI / 6;
var spinTimeout = null;
var spinArcStart = 10;
var spinTime = 0;
var spinTimeTotal = 0;
var ctx;
function draw() {
drawRouletteWheel();
}
function drawRouletteWheel() {
var canvas = document.getElementById("wheelcanvas");
if (canvas.getContext) {
var outsideRadius = 200;
var textRadius = 160;
var insideRadius = 125;
ctx = canvas.getContext("2d");
ctx.clearRect(0,0,500,500);
ctx.strokeStyle = "black";
ctx.lineWidth = 2;
ctx.font = 'bold 12px sans-serif';
for(var i = 0; i < 12; i++) {
var angle = startAngle + i * arc;
ctx.fillStyle = colors[i];
ctx.beginPath();
ctx.arc(250, 250, outsideRadius, angle, angle + arc, false);
ctx.arc(250, 250, insideRadius, angle + arc, angle, true);
ctx.stroke();
ctx.fill();
ctx.save();
ctx.shadowOffsetX = -1;
ctx.shadowOffsetY = -1;
ctx.shadowBlur = 0;
ctx.shadowColor = "rgb(220,220,220)";
ctx.fillStyle = "black";
ctx.translate(250 + Math.cos(angle + arc / 2) * textRadius, 250 + Math.sin(angle + arc / 2) * textRadius);
ctx.rotate(angle + arc / 2 + Math.PI / 2);
var text = restaraunts[i];
ctx.fillText(text, -ctx.measureText(text).width / 2, 0);
ctx.restore();
}
//Arrow
ctx.fillStyle = "black";
ctx.beginPath();
ctx.moveTo(250 - 4, 250 - (outsideRadius + 5));
ctx.lineTo(250 + 4, 250 - (outsideRadius + 5));
ctx.lineTo(250 + 4, 250 - (outsideRadius - 5));
ctx.lineTo(250 + 9, 250 - (outsideRadius - 5));
ctx.lineTo(250 + 0, 250 - (outsideRadius - 13));
ctx.lineTo(250 - 9, 250 - (outsideRadius - 5));
ctx.lineTo(250 - 4, 250 - (outsideRadius - 5));
ctx.lineTo(250 - 4, 250 - (outsideRadius + 5));
ctx.fill();
}
}
function spin() {
spinAngleStart = Math.random() * 10 + 10;
spinTime = 0;
spinTimeTotal = Math.random() * 3 + 4 * 1000;
rotateWheel();
}
function rotateWheel() {
spinTime += 30;
if(spinTime >= spinTimeTotal) {
stopRotateWheel();
return;
}
var spinAngle = spinAngleStart - easeOut(spinTime, 0, spinAngleStart, spinTimeTotal);
startAngle += (spinAngle * Math.PI / 180);
drawRouletteWheel();
spinTimeout = setTimeout('rotateWheel()', 30);
}
function stopRotateWheel() {
clearTimeout(spinTimeout);
var degrees = startAngle * 180 / Math.PI + 90;
var arcd = arc * 180 / Math.PI;
var index = Math.floor((360 - degrees % 360) / arcd);
ctx.save();
ctx.font = 'bold 30px sans-serif';
var text = restaraunts[index]
ctx.fillText(text, 250 - ctx.measureText(text).width / 2, 250 + 10);
ctx.restore();
}
function easeOut(t, b, c, d) {
var ts = (t/=d)*t;
var tc = ts*t;
return b+c*(tc + -3*ts + 3*t);
}
draw();
</script>
4. 按健精灵如何获取HTML5源码
我不知道你说的是个啥子,但是你通过浏览器F12就可以看到当前页面源码,下载可以用IDM或者右键直接下载。
按键精灵是什么,请赐教???
5. 怎么运行 html5游戏的源代码
HTML5游戏是通过html+javascript+css技术开发的游戏,属于网页游戏,可以运行在HTML5的网页浏览器中。
运行HTML5游戏,需要一个支持HTML5的网页浏览器,比如IE10或11,google的chrome浏览器,火狐firefox,网络浏览器,或者QQ浏览器,猎豹浏览器等CHROME内核的浏览器。
下载的HTML5游戏文件解压后,文件夹中会有一个后缀为html或者htm的文件,应该是在根目录下一般以index.html命名。其他文件可能有js后缀,css后缀,或者图片,请保持相对位置不能动。
然后按下面方式运行那个html文件:
方法1:
打开浏览器,将html文件拖拽到浏览器中。
方法2:
在文件夹中选中html文件,点右键,在菜单选择“打开方式”,然后选择火狐、Chrome浏览器、或者上述所说的网络浏览器、QQ浏览器、猎豹浏览器即可。
6. 找一点html5写的源代码案例,供初学者学习
首先准备好11张图片,放到img文件夹下供调用
7. 如何获取HTML5源码
1是用chrome直接访问浏览器。
2是用手机USB链接电脑,开启开发者模式,手机端安装chrome并开启开发者模式访问页面,PC端chrome安装插件ADB Plugin,访问localhost:****,用chrome开发者工具调试。
8. 急求html5网页及源代码,不要特别难,下面是作业,用记事本帮我写下源代码
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style type="text/css">
.divHead
{
background-color: #202020;
height: 40px;
width: 100%;
position: absolute;
overflow: hidden;
}
.ul {
color: white;
list-style: none;
height: 100%;
margin-left: 170px;
width: 40%;
float: left;
}
.ul1 {
color: white;
list-style: none;
height: 100%;
margin-left: 200px;
width: 20%;
float: left;
}
.ul>li {
float: left;
padding-left: 10px;
padding-right: 10px;
display: block;
height: 100%;
margin-top: -16px;
padding-top: 10px;
}
.ul>li:hover {
background-color: black;
}
.ul1>li {
float: left;
padding-left: 10px;
padding-right: 10px;
display: block;
height: 100%;
margin-top: -16px;
padding-top: 10px;
}
.ul>li>a
{
color: white;
text-decoration: none;
}
.ul1>li>a
{
color: white;
text-decoration: none;
}
.ul1>li:hover {
background-color: black;
}
</style>
</head>
<body>
<form id="form1" runat="server" style="overflow: hidden">
<div id="divHead" class="divHead">
<ul class="ul">
<li>
<a href="#">Note</a>
</li>
<li>
<a href="#">首页</a>
</li>
<li>
<a href="#">笔记</a>
</li>
<li>
<a href="#">网站推荐</a>
</li>
</ul>
<ul class="ul1">
<li>
<a href="#">登录</a>
</li>
<li>
<a href="#">退出</a>
</li>
</ul>
</div>
<div id="divMain" style="height: 550px; width: 100%">
<div style="height: 60%;background-color: #B89460;width: 100%">
<div style="width: 10%;float: left">
</div>
<div style="width: 80%;float: left">
</div>
<div style="width: 10%;float: left">
</div>
</div>
<div style="height: 40%;background-color: white;width: 100%">
<div style="width: 80%;height: 100%;margin-left: 10%">
<div style="width: 33%;height: 100%;float: left;text-align: center">
<p style="font-size: 30px;font-weight: bold;">
前端技术<br/><a style="font-size: 17px;font-weight: normal">
hahahahhahhhahhah
</a>
</p>
<input type="button" value="查看详情>>" />
</div>
<div style="width: 33%;height: 100%;float: left;text-align: center">
<p style="font-size: 30px;font-weight: bold;">
前端技术<br/><a style="font-size: 17px;font-weight: normal">
hahahahhahhhahhah
</a>
</p>
<input type="button" value="查看详情>>" />
</div>
<div style="width: 33%;height: 100%;float: left;text-align: center">
<p style="font-size: 30px;font-weight: bold;">
前端技术<br/><a style="font-size: 17px;font-weight: normal">
hahahahhahhhahhah
</a>
</p>
<input type="button" value="查看详情>>" />
</div>
</div>
</div>
</div>
<div id="divFoot" style="background-color: #202020; height: 30px; width: 100%; text-align: center;
padding-top: 10px; color: white; font-size: 14px;">
@版权所有:大华明智软件
</div>
</form>
</body>
</html>
9. html5源码可以直接使用吗
特别简单的源码可以直接修改使用。现在大型网站包含的东西一般都是用于生产环境(用户浏览的界面)的,开发环境写的源码经过处理才用到生产环境,实际代码只适合使用,维护和修改需要人家的开发板源码才行。
10. 求一个HTML5的页面代码要齐全
html5页面和一般的html页面区别基本不算太大,因为我也刚刚接触h5不久。在一般的页面上加上h5的头信息就可以吧一般页面变成h5页面了。在h5页面上。需要注意一下width和height,标签的话基本上是多了一些新的。和废除了一些旧的,你下一个h5的chm看下就知道了。我现在做项目,用的就是h5,用的头信息是这个:
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">