寒假第9页作业

本文介绍了一种使用HTML和CSS实现的特殊布局——花样连接卡,通过相对定位展示了不同链接之间的空间关系。此外,还提供了一个简单的投资计算示例,演示了如何计算不同年份的投资回报。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1

<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>花样连接卡</title>
		<style>
			div{
				border: 1px solid red;
				width: 320px;
				height: 320px;
				margin: 0 auto;
				
			}
			a{
				border: 1px solid black;
				display: block;
				width: 100px;
				height: 100px;
				background-color: pink;
				margin:0px 0px 0px 5px ;
				text-align: center;
				
			}
			div a:nth-of-type(2){
				position: relative;
				left: 200px;
				bottom: 100px;
			}
			div a:nth-of-type(3){
				position: relative;
				left: 100px;
				bottom: 100px;
			}
			div a:nth-of-type(4){
				position: relative;
				bottom: 100px;
			}
			div a:nth-of-type(5){
				position: relative;
				left: 200px;
				bottom: 200px;
			}
			a:hover{
				background: blue;
			}
		</style>
	</head>
	<body>
		<div>
			<a>链接1</a>
			<a>链接2</a>
			<a>链接3</a>
			<a>链接4</a>
			<a>链接5</a>
		</div>
	</body>
</html>

2

public static void main(String[]args){
System.out.println(“本金为:1000.0”);
System.out.println("");
double price=1000.0;
double year1=0.02251price+price;
double year2=0.0272price+price;
double year3=0.03243price+price;
double year5=0.0365price+price;
System.out.println(“存取一年后的本息是:”+year1);
System.out.println("");
System.out.println(“存取两年后的本息是:”+year2);
System.out.println("");
System.out.println(“存取三年后的本息是:”+year3);
System.out.println("");
System.out.println(“存取五年后的本息是:”+year5);
存取一年后的本息是:1022.5

存取两年后的本息是:1054.0

存取三年后的本息是:1097.2

存取五年后的本息是:1180.0

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值