css中背景的应用
浏览器默认的字体大小是 font-size:16px; 谷歌最小的是10px 其他浏览器是12px
通配符选择器 * “*”的意思是代表所有的标签
回到正题
background 背景
他的几个属性 背景颜色 background-color:red; (IE9以下给body设置background-color:不起作用需要用到bgcolor)
背景图片 background-image:url("路径“);
图片平铺 1.平铺 (浏览器默认)
2.不平埔 background-repeat:no-repeat; 3.平铺一整张背景 background-size: 100% 100; 横向x 纵向y
4.平铺整行 background-repeat:repeat-x;
5.平铺整列 background-repeat:repeat-y;
背景位置 background-position (注意背景位置也叫坐标轴位置 : 向右为正 向下为正
background-position:100px 100px; 意思是向右100像素 向下100像素 (具体数字)
位置值种类 具体的数字 百分比 或英文单词
background-position: 50% 50%; 向右百分之五十 向下百分之五十
background-position:top left; 意思是向上 向左 top left right bottom center
上 左 右 底部 中间
也可以进行简写 background:red url("路径") no-repeat 100px 100px;
颜色 图片 平铺 位置
注意不是所有图片都可以 如 图片大小就不行
边框
边框粗细 border-width:2px; 边框大小2像素
边框颜色 border-color:blue;
边框样式 border-style:solid; (实线) bashed(虚线)
边框简写 border:blue 1px dashed; 第三个必须是样式
边框圆角 border-radius: 50% 50%; 这是个圆形 小于或大于百分之五十 会有直线 变成圆角矩形
(后面的值必须是百分比)
css中背景的应用的更多相关文章
- CSS中背景图片定位方法
转自:http://www.ruanyifeng.com/blog/2008/05/css_background_image_positioning.html 作者: 阮一峰 日期: 2008年5月 ...
- CSS中背景图片的background-position中的left top到底是相对于谁的?
在学习的时候遇到了如下问题: CSS中背景图片的background-position中的left top到底是相对于谁的,content-box?padding-box?border-box? ba ...
- (转)HTML&CSS——background: url() no-repeat 0 -64px;CSS中背景图片定位方法
http://blog.csdn.net/oscar92420aaa/article/details/51304067 CSS中背景图片的定位,困扰我很久了.今天总算搞懂了,一定要记下来. 在CSS中 ...
- HTML&CSS——background: url() no-repeat 0 -64px;CSS中背景图片定位方法
CSS中背景图片的定位,困扰我很久了.今天总算搞懂了,一定要记下来. 在CSS中,背景图片的定位方法有3种: 1)关键字:background-position: top left; 2)像素:bac ...
- CSS 中背景图片定位方法
三种: 关键字:background-position: top left; 像素:background-position: 0px 0px; 百分比:background-position: 0% ...
- css中背景 字体 文体属性练习
@charset "utf-8"; body{ background-color:#332244;/*//背景颜色*/ background-image:("../kk. ...
- webpack中,css中打包背景图,路径报错
css-loader: //打包样式中背景图 { test: /\.(png|jpg)$/, loader: "url-loader?limit=8192&name=images/[ ...
- 用extract-text-webpack-plugin提取出来的css文件中背景图片url的不正确的问题
在一个main.js中require一个scss文件,scss文件中用了背景图片,图片url是用的相对路径,用extract-text-webpack-plugin插件提取出的css文件背景图片路径不 ...
- css中background背景属性概
css中background背景属性概 background:url(背景图片路径) no-repeat;/*不重复默认在左上方*/background:url(背景图片路径) no-repeat ...
随机推荐
- MyBatis-Plus使用教程
单机版 安装环境 上传压缩包到/usr/local/software/下 解压安装包,进入解压目录的bin目录下,启动命令: ./solr start -force 默认端口是8983,请求虚拟机, ...
- linux-----初学命令和理解
the following Codes has been confirmed by me 1.头部标识[pecool@demo ~]: 其中pecool代表登入用户:demo代表系统名称:~代表当前处 ...
- Go Example--通道非阻塞
package main import ( "fmt" ) func main() { messages := make(chan string) signals := make( ...
- The difference among ioctl, unlocked_ioctl and compat_ioctl (RT)
Meta-answer: All the raw stuff happening to the Linux kernel goes through lkml (the Linux kernel mai ...
- 设置 sideload Outlook Add-ins
上期,我们讲到了用前端技术去建立一个outlook add-ins 我们今天来讲解一下怎样测试一个sideload outlook add-ins. 1. 我们需要登录Outlook在Office 3 ...
- 子序列匹配(search,find_end,search_n)
search 版本一返回[first1,last1-(last2-first2)]中的第一个iterator i,使得满足对于[first2,last2)中的每个iterator j,*(i+(j-f ...
- ubuntu 14上安装mysql离线包
1.下载mysql在linux下离线安装包文件:wget http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.33-linux-glibc2. ...
- 启用 webpack 的模块热替换特性
启用 webpack 的模块热替换特性: module.exports = { //... devServer: { hot: true } } 注意,必须有 webpack.HotModuleRep ...
- kafka重复数据问题排查记录
问题 向kafka写数据,然后读kafka数据,生产的数据量和消费的数据量对不上. 开始怀疑人生,以前奠定的基础受到挑战... 原来的测试为什么没有覆盖生产量和消费量的对比? 消费者写的有问题?反复检 ...
- Apache Kafka监控之Kafka Web Console
Kafka Web Console:是一款开源的系统,源码的地址在https://github.com/claudemamo/kafka-web-console中.Kafka Web Console也 ...