第一篇博客

自学CSS——用div制作一个十分简陋的页面
——入住CSDN之后的第一篇博客

html代码奉上

<div id="header" align="center">
		<img src="timg1.jpg" width=48 top=10px>
		<span style="font-size: xx-large"> title </span>
		<p> <span style="font-size: x-large"> enter your name: </span>
			<input id="inputDemo" type="text" placeholder="输入姓名...">	
			<button type="button"> <span style="font-family: Comic Sans MS"> <b> login </b> </span> </button> </p>
	</div>

	<div id="lefter" align="center">
		<h2> <span style="font-size: large"> <b> MENU </b> </span> </h2>
		<ul>
			<li> <a href="firsthtml.html" target=_blank> HTML </a> </li>
			<li> <a href="firsthtml.html" target=_blank> CSS </a> </li>
			<li> <a href="firsthtml.html" target=_blank> JavaScript </a> </li>
		</ul>
	</div>

	<div id="container" align="center">
		<span style="font-size: large">
			container
		</span>
	</div>

	<div id="righter" align="center">
		<h2> <span style="font-size: large"> <b> MENU </b> </span> </h2>
		<ul>
			<li> <a href="firsthtml.html" target=_blank> Java </a> </li>
			<li> <a href="firsthtml.html" target=_blank> Cpp </a> </li>
			<li> <a href="firsthtml.html" target=_blank> Python </a> </li>
		</ul>
	</div>

	<div id="footer" align="center">
		footer
	</div>

CSS代码奉上

<style>
		*{
			font-family: Comic Sans MS;
		}
		#header, #footer{
			background-color: gray;
			color: white;
			width: 100%;
			height: 100px;
			/*clear: both; 清除两侧(both)的浮动元素*/
			float: left;
			border-radius: 20px;
		}
		#container{
			background-color: white;
			width: 80%;
			height: 800px;
			float: left;
			border-radius: 20px;
		}
		#lefter, #righter{
			background-color: lightgray;
			height: 800px;
			width: 10%;
			float: left;
			border-radius: 20px;
		}
		input[type=text]{
			padding: 5px;
			width: 100px;
			margin: 3px 1px;
			box-sizing: border-box;
			border: 1px solid #555;
			border-radius: 8px;
			outline: none;
			-webkit-transition: width 0.5s ease-in-out;
			transition: width 0.5s ease-in-out;
		}
		input[type=text]:focus{
			background-color: lightblue;
			width: 12%;
			border-radius: 5px;
		}
		img{
			position: absolute;
			top: 10px;
			left: 580px;
		}
		ul{
			list-style-type: none;
			padding: 0px;
		}
		li a{
			display: block;
			padding: 8px 16px;
			text-decoration: none;
		}
		li a:hover{
			background-color: white;
			font-size: large;
			font-weight: bold;
		}
	</style>

效果图:

初始页面
一些小的效果
链接的一些效果

心得体会:

开始学习html和css快半个月了,计划是html+css+js+jq–>vue,然后开始搞前端?
后端的知识目前已经学了java和MySQL,但是还不精通。 之后要开始练习前后端的交互,努力成为一个可前可后的优秀程序员!

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Matplotlib是Python中最流行的数据可视化库之一。它可以绘制各种类型的图表,从简单的线图到复杂的三维图表。与其他绘图库相比,Matplotlib具有许多优点,例如易于学习和使用、广泛的文档和社区支持等等。本篇博客将介绍Matplotlib的基础知识和常用技巧。 Matplotlib基础知识: Matplotlib是一个面向对象的绘图库,它具有许多对象和方法。下面是Matplotlib对象的一些基本概念: 1. Figure:画布,它是最外层的容器。 2. Axes:坐标轴,它是Figure中的一个子对象。 3. Axis:X轴或Y轴,它是Axes对象的一部分。 4. Artist:图表中的所有部分,例如标题、标签、线条等等,都是Artist对象的实例。 要使用Matplotlib绘制图表,首先必须创建一个Figure对象,然后在其中添加一个或多个Axes对象。接下来,使用Axes对象的方法来添加Artist对象。 下面是一个简单的代码示例: ```python import matplotlib.pyplot as plt # 创建Figure和Axes对象 fig, ax = plt.subplots() # 添加Artist对象 ax.plot([1, 2, 3, 4], [1, 4, 2, 3]) # 显示图表 plt.show() ``` 在这个例子中,我们创建了一个Figure对象和一个Axes对象,然后在Axes对象中添加了一条线。最后,我们调用show()函数来显示图表。 常用技巧: 1. 设置图表样式: Matplotlib提供了许多方法来设置图表样式,例如设置标题、标签、颜色、线型、线宽等等。可以通过调用Axes对象的方法来实现。例如: ```python # 设置标题 ax.set_title('My First Matplotlib Chart') # 设置X轴标签 ax.set_xlabel('X Label') # 设置Y轴标签 ax.set_ylabel('Y Label') # 设置线条颜色 ax.plot(x, y, color='r') # 设置线条线型 ax.plot(x, y, linestyle='--') # 设置线条线宽 ax.plot(x, y, linewidth=2) ``` 2. 绘制多个子图: Matplotlib可以在一个Figure对象中绘制多个子图。可以使用subplot()函数来创建子图,该函数将返回一个Axes对象,在其中添加Artist对象。例如: ```python # 创建一个2x2的子图 fig, axs = plt.subplots(2, 2) # 在第一个子图中绘制一条线 axs[0, 0].plot(x, y) # 在第二个子图中绘制散点图 axs[0, 1].scatter(x, y) # 在第三个子图中绘制条形图 axs[1, 0].bar(x, y) # 在第四个子图中绘制饼图 axs[1, 1].pie(y) ``` 3. 保存图表: Matplotlib可以将图表保存为PNG、PDF、SVG等格式。可以使用savefig()函数来保存图表,该函数将文件路径作为参数。例如: ```python # 保存图表为PNG格式 plt.savefig('mychart.png') # 保存图表为PDF格式 plt.savefig('mychart.pdf') # 保存图表为SVG格式 plt.savefig('mychart.svg') ``` 总结: Matplotlib是一个强大的数据可视化库,可以绘制各种类型的图表。本篇博客介绍了Matplotlib的基础知识和常用技巧,希望能够帮助初学者更快地上手Matplotlib。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值