<!DOCTYPE html>
<html>
<head>
	<title>短网址生成器</title>
	<style type="text/css">
		body {
			background-color: #f5f5f5;
			font-family: Arial, sans-serif;
		}
		h1 {
			text-align: center;
			margin-top: 50px;
		}
		form {
			margin: auto;
			width: 50%;
			padding: 20px;
			background-color: #fff;
			border-radius: 10px;
			box-shadow: 0px 0px 10px #ccc;
		}
		input[type="text"] {
			width: 100%;
			padding: 10px;
			margin-bottom: 20px;
			border-radius: 5px;
			border: none;
			box-shadow: 0px 0px 5px #ccc;
			font-size: 16px;
		}
		input[type="submit"] {
			background-color: #4CAF50;
			color: #fff;
			padding: 10px 20px;
			border: none;
			border-radius: 5px;
			cursor: pointer;
			font-size: 16px;
		}
		input[type="submit"]:hover {
			background-color: #3e8e41;
		}
		.short-url {
			margin-top: 20px;
			text-align: center;
			background-color: #fff;
			padding: 20px;
			border-radius: 10px;
			box-shadow: 0px 0px 10px #ccc;
			word-wrap: break-word;
			font-size: 18px;
			color: #4CAF50;
		}
	</style>
</head>
<body>
	<h1>短网址生成器</h1>
	<form action="shorten.php" method="POST">
		<label for="url">输入网址:</label>
		<input type="text" name="url" id="url" placeholder="输入长网址" required>
		<input type="submit" value="生成">
	</form>
	<div class="short-url" id="short-url">
		<?php if(isset($_GET['short'])): ?>
			您的短网址是:<a href="<?php echo $_GET['short']; ?>" target="_blank"><?php echo $_GET['short']; ?></a>
		<?php endif; ?>
	</div>
</body>
</html>
想写一个短网址的网页源码html+css美化

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

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