<!DOCTYPE html>
<html>
<head>
	<title>参数设置</title>
	<style>
		body {
			margin: 0;
			padding: 0;
			font-family: Arial, sans-serif;
			background-color: #f7f7f7;
		}
<pre><code>	.lsidebar {
		position: fixed;
		top: 0;
		left: -300px;
		width: 300px;
		height: 100%;
		background-color: #fff;
		box-shadow: 0 0 20px rgba(0,0,0,0.2);
		transition: left 0.5s ease-in-out;
		z-index: 9999;
	}

	.lsidebar.show {
		left: 0;
	}

    .rsidebar {
		position: fixed;
		top: 0;
		right: -500px;
		width: 500px;
		height: 100%;
		background-color: #fff;
		box-shadow: 0 0 20px rgba(0,0,0,0.2);
		transition: right 0.5s ease-in-out;
		z-index: 9999;
	}

	.rsidebar.show {
		right: 0;
	}

	
	.main-content {
		padding: 20px;
		max-width: 800px;
		margin: 0 auto;
	}

	h1 {
		font-size: 36px;
		margin-top: 0;
	}

	p {
		font-size: 16px;
		line-height: 1.5;
	}

	label {
		display: block;
		font-weight: bold;
		margin-bottom: 10px;
	}

	input[type=&quot;text&quot;] {
		padding: 10px;
		font-size: 16px;
		border-radius: 5px;
		border: 1px solid #ccc;
		margin-bottom: 20px;
		width: 100%;
		box-sizing: border-box;
	}

	button {
		padding: 10px;
		font-size: 16px;
		cursor: pointer;
		background-color: #007bff;
		color: #fff;
		border: none;
		border-radius: 5px;
		margin-right: 10px;
	}

	button:hover {
		background-color: #0062cc;
	}

	button:focus {
		outline: none;
	}

	.btn-group {
		margin-bottom: 20px;
	}

	.btn-group button:last-child {
		margin-right: 0;
	}

	.user-list {
		list-style-type: none;
		padding: 0;
		margin: 0;
	}

	.user-list li {
		padding: 10px;
		border-bottom: 1px solid #ccc;
	}

	.user-list li:last-child {
		border-bottom: none;
	}

	.radio-button {
		display: inline-block;
		position: relative;
		margin-right: 20px;
	}

	.radio-button input[type=&quot;radio&quot;] {
		opacity: 0;
		position: absolute;
		top: 0;
		left: 0;
	}

	.radio-button span {
		display: block;
		height: 30px;
		width: 30px;
		border: 2px solid #ccc;
		border-radius: 50%;
		text-align: center;
		line-height: 30px;
		cursor: pointer;
	}

	.radio-button input[type=&quot;radio&quot;]:checked + span {
		background-color: #2196F3;
		color: #fff;
	}
&lt;/style&gt;
</code></pre>
</head>
<body>
	<div class="lsidebar">
		<h1>参数设置</h1>
		<div>
			<h2>单双面</h2>
			<label class="radio-button">
			  <input type="radio" name="single-sided" value="single">
			  <span>单面</span>
			</label>
			<label class="radio-button">
			  <input type="radio" name="single-sided" value="double">
			  <span>双面</span>
			</label>
		  </div>
<pre><code>	  &lt;div&gt;
		&lt;h2&gt;文件类型&lt;/h2&gt;
		&lt;label class=&quot;radio-button&quot;&gt;
		  &lt;input type=&quot;radio&quot; name=&quot;file-type&quot; value=&quot;pdf&quot;&gt;
		  &lt;span&gt;PDF&lt;/span&gt;
		&lt;/label&gt;
		&lt;label class=&quot;radio-button&quot;&gt;
		  &lt;input type=&quot;radio&quot; name=&quot;file-type&quot; value=&quot;jpg&quot;&gt;
		  &lt;span&gt;JPG&lt;/span&gt;
		&lt;/label&gt;
	  &lt;/div&gt;
	  
	  &lt;div&gt;
		&lt;h2&gt;DPI&lt;/h2&gt;
		&lt;label class=&quot;radio-button&quot;&gt;
		  &lt;input type=&quot;radio&quot; name=&quot;dpi&quot; value=&quot;200&quot;&gt;
		  &lt;span&gt;200&lt;/span&gt;
		&lt;/label&gt;
		&lt;label class=&quot;radio-button&quot;&gt;
		  &lt;input type=&quot;radio&quot; name=&quot;dpi&quot; value=&quot;500&quot;&gt;
		  &lt;span&gt;500&lt;/span&gt;
		&lt;/label&gt;
	  &lt;/div&gt;
&lt;/div&gt;

&lt;div class=&quot;rsidebar&quot;&gt;
	&lt;div class=&quot;btn-group&quot;&gt;
		&lt;ul class=&quot;user-list&quot;&gt;
			&lt;li&gt;张三&lt;/li&gt;
			&lt;li&gt;李四&lt;/li&gt;
			&lt;li&gt;王五&lt;/li&gt;
			&lt;li&gt;赵六&lt;/li&gt;
		&lt;/ul&gt;
		&lt;button type=&quot;submit&quot;&gt;保存&lt;/button&gt;
	&lt;/div&gt;
&lt;/div&gt;

&lt;div class=&quot;main-content&quot;&gt;
	&lt;h1&gt;主要内容&lt;/h1&gt;
	&lt;p&gt;这里是网页的主要内容。&lt;/p&gt;
	&lt;form&gt;
		&lt;label for=&quot;file-name&quot;&gt;文件名称&lt;/label&gt;
		&lt;input type=&quot;text&quot; id=&quot;file-name&quot; placeholder=&quot;请输入文件名称&quot;&gt;
	&lt;/form&gt;
	&lt;div class=&quot;btn-group&quot;&gt;
		&lt;button onclick=&quot;showUserList()&quot;&gt;用户列表&lt;/button&gt;
		&lt;button onclick=&quot;showParam()&quot;&gt;参数&lt;/button&gt;
	&lt;/div&gt;
&lt;/div&gt;

&lt;script&gt;
	var mainContent = document.querySelector('.main-content');
	var lsidebar = document.querySelector('.lsidebar');
	var rsidebar = document.querySelector('.rsidebar');
	
	function showParam() {
		if(lsidebar.classList.contains('show')) {
			lsidebar.classList.remove('show');
		} else {
			lsidebar.classList.add('show');
		}
	}

	function showUserList() {
		if(rsidebar.classList.contains('show')) {
			rsidebar.classList.remove('show');
		} else {
			rsidebar.classList.add('show');
		}
	}

	var userList = document.querySelector(&quot;.user-list&quot;);
	var saveBtn = document.querySelector(&quot;.rsidebar button&quot;);

	saveBtn.addEventListener(&quot;click&quot;, function(event) {
		event.preventDefault();
		// 保存操作
	});
&lt;/script&gt;
</code></pre>
</body>
</html>
你现在是一位前端程序员。 我现在要帮我优化下面的代码要求尽量美观请快速输出防止网络超时 !DOCTYPE htmlhtmlhead	title参数设置title	style		body 			margin 0;			padding 0;			font-family Arial sans-serif;			background-color #f7f7f7;						lsidebar 			pos

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

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