使用HTML建立一个简单的相册

c#.net开发求职招聘微信群 http://liangssw.com/bozhu/14329.html

HTML代码展示:

!DOCTYPEhtmlhtmlheadtitle相册/titlestyle.album{display:flex;flex-wrap:wrap;}.albumimg{width:px;height:px;margin:10px;}.album.caption{flex-basis:%;padding:10px;background-color:rgba(0,0,0,0.5);color:white;font-size:18px;}/style/headbodydivclass="album"imgsrc="image1.jpg"alt="Image1"divclass="caption"图1:这是图片的标题/divimgsrc="image2.jpg"alt="Image2"divclass="caption"图2:这是图片的标题/divimgsrc="image3.jpg"alt="Image3"divclass="caption"图3:这是图片的标题/div!--在此处添加更多的图片和标题--/div/body/html

css代码展示:

!DOCTYPEhtmlhtmlheadtitle相册/titlestyle.album{display:flex;flex-wrap:wrap;}.albumimg{width:px;height:px;margin:10px;}.album.caption{flex-basis:%;padding:10px;background-color:rgba(0,0,0,0.5);color:white;font-size:18px;}/style/headbodydivclass="album"imgsrc="image1.jpg"alt="Image1"divclass="caption"图1:这是图片的标题/divimgsrc="image2.jpg"alt="Image2"divclass="caption"图2:这是图片的标题/divimgsrc="image3.jpg"alt="Image3"divclass="caption"图3:这是图片的标题/div!--在此处添加更多的图片和标题--/div/body/html

效果显示:

请注意,你需要将"image1.jpg","image2.jpg"和"image3.jpg"替换为你自己的图片文件名,并确保这些文件与HTML文件位于同一个文件夹中。你还可以根据需要添加更多的图片和标题。希望这个模板能帮助你制作一个简单的相册!




转载请注明:http://www.aierlanlan.com/rzdk/10047.html

  • 上一篇文章:
  •   
  • 下一篇文章: 没有了