<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>兽人设定生成器</title>
	<style>
		body {
			background-color: #F9F9F9;
			font-family: Arial, sans-serif;
			color: #333;
			margin: 0;
			padding: 0;
		}
		.container {
			max-width: 800px;
			margin: 0 auto;
			padding: 20px;
			box-sizing: border-box;
			background-color: #FFF;
			box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
		}
		h1 {
			font-size: 36px;
			font-weight: bold;
			text-align: center;
			margin-top: 0;
			margin-bottom: 20px;
			color: #333;
		}
		p {
			font-size: 18px;
			margin-bottom: 10px;
			color: #666;
		}
		input[type="text"] {
			border: none;
			background-color: #F2F2F2;
			padding: 10px;
			font-size: 16px;
			border-radius: 5px;
			width: 100%;
			box-sizing: border-box;
			margin-bottom: 20px;
			color: #333;
		}
		button {
			background-color: #333;
			color: #FFF;
			border: none;
			padding: 10px;
			font-size: 16px;
			border-radius: 5px;
			cursor: pointer;
			transition: background-color 0.3s ease;
		}
		button:hover {
			background-color: #666;
		}
		hr {
			border: none;
			border-top: 1px solid #CCC;
			margin: 20px 0;
		}
		ul {
			list-style: none;
			margin: 0;
			padding: 0;
		}
		li {
			font-size: 16px;
			margin-bottom: 10px;
			color: #666;
		}
	</style>
</head>
<body>
	<div class="container">
		<h1>兽人设定生成器</h1>
		<p>请输入您的名字:</p>
		<input type="text" id="name">
		<button onclick="generate()">生成设定</button>
		<hr>
		<p>您的设定如下:</p>
		<ul id="result">
		</ul>
	</div>
<pre><code>&lt;script&gt;
	function generate() {
		// 获取用户输入的名字
		var name = document.getElementById(&quot;name&quot;).value;
		// 将名字转成ASCII码之和
		var sum = 0;
		for (var i = 0; i &lt; name.length; i++) {
			sum += name.charCodeAt(i);
		}
		// 生成伪随机数
		var random = sum * 1234567 % 1000;
		// 根据随机数生成兽人设定
		var gender = random % 2 == 0 ? &quot;男性&quot; : &quot;女性&quot;;
		var height = Math.floor((random + 100) / 10) + &quot;cm&quot;;
		var waist = Math.floor((random + 200) / 10) + &quot;cm&quot;;
		var bust = Math.floor((random + 300) / 10) + &quot;cm&quot;;
		var hip = Math.floor((random + 400) / 10) + &quot;cm&quot;;
		var species = random % 4 == 0 ? &quot;狼人&quot; : random % 4 == 1 ? &quot;猫人&quot; : random % 4 == 2 ? &quot;熊人&quot; : &quot;鹰人&quot;;
		var color = random % 3 == 0 ? &quot;棕色&quot; : random % 3 == 1 ? &quot;黑色&quot; : &quot;白色&quot;;
		var fur = random % 3 == 0 ? &quot;全身长毛&quot; : random % 3 == 1 ? &quot;部分长毛&quot; : &quot;无毛&quot;;
		var tail = Math.floor((random + 500) / 100) + &quot;cm&quot;;
		var fluffiness = random % 3 == 0 ? &quot;非常蓬松&quot; : random % 3 == 1 ? &quot;有些蓬松&quot; : &quot;不太蓬松&quot;;
		var ears = random % 3 == 0 ? &quot;竖耳&quot; : random % 3 == 1 ? &quot;尖耳&quot; : &quot;圆耳&quot;;
		var fashion = random % 3 == 0 ? &quot;古典风格&quot; : random % 3 == 1 ? &quot;现代风格&quot; : &quot;异域风格&quot;;
		var university = random % 3 == 0 ? &quot;兽人大学&quot; : random % 3 == 1 ? &quot;魔法学院&quot; : &quot;科技学院&quot;;
		var major = random % 3 == 0 ? &quot;战斗学&quot; : random % 3 == 1 ? &quot;魔法学&quot; : &quot;科技学&quot;;
		var birthplace = random % 3 == 0 ? &quot;森林&quot; : random % 3 == 1 ? &quot;山区&quot; : &quot;草原&quot;;
		var residence = random % 3 == 0 ? &quot;城市&quot; : random % 3 == 1 ? &quot;乡村&quot; : &quot;海边&quot;;

		// 将设定添加到页面上
		var result = document.getElementById(&quot;result&quot;);
		result.innerHTML = &quot;&lt;li&gt;性别:&quot; + gender + &quot;&lt;/li&gt;&quot; +
							&quot;&lt;li&gt;身高:&quot; + height + &quot;&lt;/li&gt;&quot; +
							&quot;&lt;li&gt;腰围:&quot; + waist + &quot;&lt;/li&gt;&quot; +
							&quot;&lt;li&gt;胸围:&quot; + bust + &quot;&lt;/li&gt;&quot; +
							&quot;&lt;li&gt;臀围:&quot; + hip + &quot;&lt;/li&gt;&quot; +
							&quot;&lt;li&gt;物种:&quot; + species + &quot;&lt;/li&gt;&quot; +
							&quot;&lt;li&gt;体色:&quot; + color + &quot;&lt;/li&gt;&quot; +
							&quot;&lt;li&gt;被毛程度:&quot; + fur + &quot;&lt;/li&gt;&quot; +
							&quot;&lt;li&gt;尾巴长短:&quot; + tail + &quot;&lt;/li&gt;&quot; +
							&quot;&lt;li&gt;尾巴蓬松程度:&quot; + fluffiness + &quot;&lt;/li&gt;&quot; +
							&quot;&lt;li&gt;耳朵轮廓:&quot; + ears + &quot;&lt;/li&gt;&quot; +
							&quot;&lt;li&gt;衣着风格:&quot; + fashion + &quot;&lt;/li&gt;&quot; +
							&quot;&lt;li&gt;毕业大学:&quot; + university + &quot;&lt;/li&gt;&quot; +
							&quot;&lt;li&gt;所学专业:&quot; + major + &quot;&lt;/li&gt;&quot; +
							&quot;&lt;li&gt;出生地:&quot; + birthplace + &quot;&lt;/li&gt;&quot; +
							&quot;&lt;li&gt;居住地:&quot; + residence + &quot;&lt;/li&gt;&quot;;
	}
&lt;/script&gt;
</code></pre>
</body>
</html
请美化以下html页面的界面:!DOCTYPE htmlhtmlhead meta charset=UTF-8	title兽人设定生成器titleheadbody	h1兽人设定生成器h1	p请输入您的名字:p	input type=text id=name	button onclick=generate生成设定button	hr	p您的设定如下:p	ul id=result	ul	script

原文地址: https://www.cveoy.top/t/topic/cbrs 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录