【ife】任务九:使用HTML/CSS实现一个复杂页面

本文详细介绍了如何使用HTML和CSS实现一个复杂的页面布局。内容包括header、logo、登录区、侧边栏、文章标题、文章内容、搜索框、导航菜单、页码、历史记录、统计数据等多个部分的设计和实现,涉及多种CSS样式和布局技巧,是前端开发者提升技能的好资料。
摘要由CSDN通过智能技术生成
#total{
	width:1300px;
	font-family:Microsoft YaHei;
}
header{
	width:100%;
	height:60px;
	background:blue;
}
#logo{
	margin-left:50px;
	margin-top:15px;
}
#login{
	width:500px;
	height:60px;
	float:right;
	text-align:center;
}
#login form{
	display:inline;
}
#login input{
	background:url("../images/task9_3.png") white no-repeat 10px center;
	padding-left:30px;
	border:0;
	border-radius:15px;
	height:30px;
	width:300px;
	margin-top:15px;
}
#text{
	float:right;
	height:30px;
	line-height:30px;
	width:60px;
	margin-top:15px;
	margin-right:50px;
	text-align:right;
	background:url("../images/task9_2.png") no-repeat left center;
}
aside{
	float:left;
	height:1030px;
	width:300px;
	background:#555555;
	color:white;
}
#image{
	background:url("../images/task9_4.png") no-repeat left center;
	width:150px;
	height:64px;
	text-align:right;
	line-height:64px;
	font-size:20px;
	margin-left:75px;
	margin-top:50px;
}
#save{
	float:left;
	width:98px;
	height:30px;
	font-size:15px;
	margin-left:50px;
	margin-top:50px;
	text-align:center;
}
.line{
	float:left;
	width:2px;
	height:30px;
	background:black;
	margin-top:55px;
}
#fans{
	float:left;
	width:98px;
	height:30px;
	font-size:15px;
	margin-top:50px;
	text-align:center;
}
#menu{
	font-size:15px;
	flo
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
折叠面板是一个常见的 UI 组件,可以在 Web 页面实现内容的展开与收缩。以下是一个 HTML 右边折叠面板的实现示例: HTML 代码: ```html <div class="panel-container"> <div class="panel-header"> <h3>折叠面板标题</h3> <span class="panel-arrow"></span> </div> <div class="panel-content"> <p>折叠面板内容</p> </div> </div> ``` CSS 代码: ```css .panel-container { position: relative; width: 400px; height: 100%; } .panel-header { position: relative; z-index: 1; height: 40px; background-color: #f0f0f0; border-bottom: 1px solid #d9d9d9; cursor: pointer; } .panel-header h3 { margin: 0; padding: 0 20px; line-height: 40px; font-size: 16px; font-weight: bold; color: #333; } .panel-arrow { position: absolute; top: 50%; right: 20px; width: 0; height: 0; margin-top: -5px; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 5px solid #999; transition: transform 0.3s ease; } .panel-content { position: absolute; top: 40px; right: 0; z-index: 0; width: 0; height: 0; overflow: hidden; background-color: #fff; transition: width 0.3s ease; } .panel-container.active .panel-header .panel-arrow { transform: rotate(180deg); } .panel-container.active .panel-content { width: 300px; height: 300px; } ``` 解释: 1. `.panel-container` 设置容器的宽度和高度,并设置为相对定位,以便内部元素进行定位。 2. `.panel-header` 设置折叠面板的标题栏样式,包括高度、背景色、边框和光标样式。 3. `.panel-header h3` 设置标题栏标题的样式,包括字体大小、颜色和粗细等。 4. `.panel-arrow` 设置标题栏右侧的箭头样式,包括定位、大小和颜色等。使用 `transition` 属性实现箭头旋转效果。 5. `.panel-content` 设置折叠面板的内容区样式,包括定位、大小、背景色和过渡效果等。使用 `overflow: hidden` 属性隐藏内容超出部分。 6. `.panel-container.active .panel-header .panel-arrow` 和 `.panel-container.active .panel-content` 通过 `.active` 类实现面板的展开和收缩效果。 以上是一个简单的 HTML 右边折叠面板的实现示例。可以根据实际需求调整样式和布局。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值