20170608学习笔记整理
来源:互联网 发布:淘宝弹弓皮筋专卖 编辑:程序博客网 时间:2024/05/29 16:27
一.精通CSS第四章
1.固定宽度的圆角框
HTML:
<div class="box"><h2>yyc change the world</h2><p class="last">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin venenatis turpis ut quam. In dolor. Nam ultrices nisl sollicitudin sapien. Ut lacinia aliquet ante.</p></div>
CSS:
/*将顶部图像应用于标题元素,将底部图像应用于div框的底部。因为两个背景图像是单色的,所以可在div框上添加同色背景,形成框的主体*/.box{width: 418px;background: #effce7 url(../images/bottom.gif) no-repeat leftbottom;}.box h2{color:teal;background: url(../images/top.gif) no-repeat left top;}/*为了内容不碰到框的边界,所以在div中的元素上添加一点内边距*/.box{padding-bottom: 1px;}.box h2{margin-top: 0;padding:20px 20px 0 20px;}.box p{padding:0 20px;} /*重新设置内容、上、下背景,为了设置圆角框,再来点左右边距(上左下右)*/.box{width:424px;background: url(../images/tile2.gif) repeat-y;}.box h2{background: url(../images/top2.gif) no-repeat left top;padding-top: 20px;}.box .last{background: url(../images/bottom2.gif) no-repeat left bottom;padding-bottom: 20px;}.box h2,.box p{padding:0 20px 0 20px;}/*BUG*/p{margin-bottom: -10px;}
阅读全文
0 0
- 20170608学习笔记整理
- J2ME学习笔记整理
- java学习整理笔记
- 整理学习笔记
- linux 学习笔记整理
- VC学习笔记整理
- 学习笔记 整理
- Intent学习笔记整理
- WinDbg学习笔记整理
- mongoDB学习笔记整理
- redis学习笔记整理
- PHP学习笔记整理
- Lucene学习笔记整理
- Intent学习笔记整理
- Jquery学习笔记整理
- 深度学习笔记整理
- maven学习笔记整理
- Git 学习笔记整理
- Linux常用查看日志命令tail
- linux下安装mysql
- 深入浅出生成对抗网络1-GAN入门
- Scala中的模糊概念
- spring boot学习笔记(二)
- 20170608学习笔记整理
- 重新认识HTML系列003——base标签详解
- FFmpeg视频播放-SurfaceView
- ffmpeg将多媒体文件的Video Stream每帧画面保存为PPM格式图片
- ActiveMQ在win7下启动失败解决方案
- 基本算法思想Java实现的详细代码
- 在activity中更新fragment中的界面
- UML统一建模语言
- 点击a标签,跳转到iframe中,并在iframe中显示指定的页面