使用HTML完成下图显示页面,求大神给代码。。

使用HTML完成下图显示页面,求大神给代码。。,第1张

<!DOCTYPE>

<html lang="en">

<head>

<meta charset="UTF-8">

<title>Document</title>

<style type="text/css">

#box{

width: 600px

height: auto

}

h1{

width: 100%

height: 100px

line-height: 100px

text-align: center

background: blue

font-size: 50px

margin: 0

color: white

}

p{

background: #9f9285

font-family: "Microsoft YaHei"

font-size: 16px

line-height: 30px

text-indent: 2em

text-align: justify

border-top: 6px solid orange

margin: 0

padding: 10px

}

span{

font-size: 20px

color: blue

text-decoration: underline

}

</style>

</head>

<body>

<div id="box">

<h1>网络鞋城经营模式简介</h1>

<p><span>互联网</span>提供了无限延伸的展示空间,可以容纳无限的商品及内容。在网络鞋城,消费者无论是购物还是查询,都不受时间和地域的任何限制。在消费者享受<span>“鼠标轻轻一点,精品尽在眼前”</span>的背后,是网络鞋城耗时5年修建的物流体系,全国库房面积达到5万平方米,提供货到付款服务的城市超过<span>350</span>个,并为联营上午开通货到付款服务</p>

</div>

</body>

</html>

请采纳,谢谢

代码:

<!doctype html>

<html lang="en">

<head>

<meta charset="UTF-8">

<meta name="viewport"

content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">

<meta http-equiv="X-UA-Compatible" content="ie=edge">

<title>Document</title>

</head>

<body>

请输入消费金额:

<br>

<input type="number" id="input">

<br>

<br>

<input type="button" onclick="sub()" value="结算">

<script>

var sub = function(e) {

var money = document.getElementById("input").value

console.log(money)

if (!/^\d+\.?\d*$/.test(money)) {

return alert('请输入正确的数字')

}

if (money >50) {

money = money * .8

}

alert('本次消费金额:' + money + '元')

}

</script>

</body>

</html>


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/zaji/8375188.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-04-15
下一篇2023-04-15

发表评论

登录后才能评论

评论列表(0条)

    保存