css3学习手记

完全匹配属性选择器:[id=value]

包含匹配选择器:[id*=value]

首字符匹配选择器:[id^=value]

尾字符匹配选择器:[id$=value]


阴影:box-shadow:3px  2px 1px #000  /*其他浏览器*/       

            -webkit-box-shadow:3px  2px 1px #000  /*webkit浏览器*/

           -moz-box-shadow:3px  2px 1px #000  /*firefox浏览器*/


            text-shadow和box-shadow差不多


背景:backgroud-size  设置背景图像大小    backgroud-size:10px 5px ;     -webkit-backgroud-size:10px 5px;

          backgroud-clip  确定背景的剪裁区域   

          渐变 background:-webkit-gradient(linear/radial,0 0,0 100%,from(#fff) ,to(#000) );   

                                                                       线性渐变/径向渐变


圆角边框: border-radius:10px 5px;

                    -webkit-border-radius:10px 5px;

                     -moz-border-radius:10px 5px;

使用viewport设置适应移动设备屏幕大小

<meta  name="viewport" content="width=device-width,inital-scale=1,user-scalable=0" />

属性有:width:指定虚拟窗口的屏幕宽度大小

              height:虚拟窗口屏幕高度

              inital-scale:初始缩放比例

              maximum-scale:允许用户缩放的最大比例

              minimum-scale:允许用户缩放的最小比例

             user-scalable:是否允许手动缩放


使用media queries

当前屏幕可视区域的宽度最大值为600px时

<link rel="stylesheet" media="screen and(max-width:600px)" href="small.css" />

small.css:

@media screen and(max-width:600px){

demo{

   background:#000;

  }

}

屏幕可视区域的长度在600px到900px之间时

 media="screen and(min-width:600px) and (max-width:900px)"


当手机最大屏幕可视区域是480px时

media="screen and(max-device-width:480px)"


当移动设备处于纵向模式下时

media="all and(orientation:portrait)"


当移动设备处于横向模式下时

media="all and(orientation:landscape)"

转载于:https://www.cnblogs.com/histoo/archive/2012/11/13/2768612.html

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/274519.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

如何进入游戏行业_进入设计行业

如何进入游戏行业We’re living in some weird-ass times. One of the unfortunate results of a global pandemic is loss of jobs and financial security. While people continue to deal with this, the prospect of entering a new field — especially one that’s sligh…

据说99%的人不知道 vue-devtools 还能直接打开对应组件文件?

大家好&#xff0c;我是若川。据说 99% 的人不知道 vue-devtools 还能直接打开对应组件文件&#xff1f;本文原理揭秘曾经写过以上这篇文章&#xff0c; 也是源码共读中的第一期(点击文末阅读原文直达)。这个功能如下图所示。欢迎大家来投票&#xff0c;你的投票很重要。如果不…

ux设计中的各种地图_UX设计中的格式塔原理

ux设计中的各种地图Gestalt Theory is the theory of visual perception and how our brain pieces together reality. The theory sheds light on how cognition factors into the way viewers read a piece of design. In the German language “Gestalt” means form or sha…

【ASP】简单Url编码和Url解码实例

描述&#xff1a;在数据传输或读取时&#xff0c;有些敏感数据不宜显示传输&#xff0c;特别涉及机密或财务信息&#xff0c;因此使用编码技术尤为重要。 简单实例&#xff1a; URL编码代码&#xff1a; protected void Button1_Click(object sender, EventArgs e) { …

JetBrains下一代IDE:Fleet 公共预览版发布

大家好&#xff0c;我是若川。持续组织了近一年的源码共读活动&#xff0c;感兴趣的可以 点此扫码加我微信 ruochuan12 参与&#xff0c;每周大家一起学习200行左右的源码&#xff0c;共同进步。同时极力推荐订阅我写的《学习源码整体架构系列》 包含20余篇源码文章。历史面试系…

善用工具_如何善用色彩心理学

善用工具There’s a problem with my movement. Most of us in the profession of trying to change the world have little skills or training in the actual craft of influencing human beings to do stuff — especially stuff that is new to them such as composting, p…

看源码的第一步,我猜很多人搞错了~

大家好&#xff0c;我是若川。今天在江西人的前端群里&#xff0c;有个小伙伴问&#xff0c;vueuse 的 vitepress &#xff08;也就是官方文档仓库&#xff09;怎么搭建的&#xff0c;怎么都没有 index.json&#xff08;引用的一个文件&#xff09;。本文简单记录下流程&#x…

序列化说明(转)

序列化是用来通信的&#xff0c;服务端把数据序列化&#xff0c;发送到客户端&#xff0c;客户端把接收到的数据反序列化后对数据进行操作&#xff0c;完成后再序列化发送到服务端&#xff0c;服务端再反序列化数据后对数据进行操作。说白了&#xff0c;数据需要序列化以后才能…

1.1编写目的_1.目的

1.1编写目的A friend of mine recently founded Secta Leagues. A company that organises sports leagues for working professionals, where companies play sports against one another in the same industry. The vision is to provide an app that allows interested comp…

Web 应用架构的下一个转变

Web 技术大概 25 年前开始萌芽&#xff0c;HTTP、HTML、CSS 和 JS 都是在九十年代中期首次被标准化的。直到如今&#xff0c;Web 演变成一个无处不在的应用平台。随着 Web 的发展&#xff0c;Web 应用程序的开发架构也在不断发展。现在有许多用于构建 Web 应用程序的核心架构&a…

生命在于运动?

我有两个朋友&#xff0c;一个喜欢运动&#xff0c;经常打球骑单车&#xff0c;一个就喜欢宅在家里&#xff0c;最多大家玩的时候去旁观。两人常常争执&#xff0c;一个说&#xff1a;生命在于运动&#xff0c;你看我多健康&#xff01;一个说&#xff1a;生命在于静止&#xf…

C++ 学习笔记----类篇

&#xff08;一&#xff09;基本概念&#xff1a; 1、类与对象&#xff1a; 1 //声明类 2 class Human { 3 4 //... Data members and methods go here 5 6 }; 7 8 //定义对象 9 Human human; 2、通常用class声明类&#xff0c;struct也可以&#xff0c;只不过在信…

ux和ui_设计社交餐厅策展应用程序— UX / UI案例研究

ux和uiSabor, which translates from “taste” or “flavor” in Spanish, is a concept for an iOS app designed to provide users with honest, reliable and relatable restaurant recommendations from friends and family. It is a social restaurant curation applicat…

你不知道的 script 标签的 defer 与 async 属性

我持续组织了近一年的源码共读活动&#xff0c;感兴趣的可以 点此扫码加我微信 ruochuan12 参与&#xff0c;每周大家一起学习200行左右的源码&#xff0c;共同进步。同时极力推荐订阅我写的《学习源码整体架构系列》 包含20余篇源码文章。历史面试系列。另外&#xff1a;目前建…

我是怎么调试 Element UI 源码的

我持续组织了近一年的源码共读活动&#xff0c;感兴趣的可以 点此扫码加我微信 ruochuan12 参与&#xff0c;每周大家一起学习200行左右的源码&#xff0c;共同进步。同时极力推荐订阅我写的《学习源码整体架构系列》 包含20余篇源码文章。历史面试系列。另外&#xff1a;目前建…

java对象的理解

1、看生成几个对象&#xff0c;就看new了几次&#xff0c; Stu s1new Stu(“张三”); Stu s2s1;-这里也是生成了一个对象&#xff0c;只不过s1和s2指向了同一个对象 2、Stu s1new Stu(“张三”); Stu s2 new Stu(“李四”); s1s2&#xff1b;这里生成了两个对象&#xff0c;但是…

模板缓冲_模板缓冲以及如何使用它可视化体积相交

模板缓冲介绍 (Introduction) The trendy thing in real-time rendering these days is ray-tracing. However, traditional rasterization hasn’t disappeared, and it won’t in the near future. I recommend this blog post on the subject: A hybrid rendering pipeline …

重磅!哈啰 Quark Design 正式开源,下一代跨技术栈前端组件库

大家好&#xff0c;我是若川。我持续组织了近一年的源码共读活动&#xff0c;感兴趣的可以 点此扫码加我微信 ruochuan12 参与&#xff0c;每周大家一起学习200行左右的源码&#xff0c;共同进步。同时极力推荐订阅我写的《学习源码整体架构系列》 包含20余篇源码文章。历史面试…

对lua协程的一点理解

读《Programming In Lua》协程那一章&#xff0c;比较困惑的还是procuer-consumer那个例子&#xff1a; function consumer(prod)while true dolocal x receive(prod)print(x)end endfunction receive(prod)local status, value coroutine.resume(prod)return value endfunct…

b端 ux 设计思维_借助系统思维从视觉设计过渡到UX

b端 ux 设计思维“How can I switch to UX?” This is a common question from visual designers because there’s a lot of overlap on the surface. But it can also be a difficult transition since UX encompasses much more below the surface.“如何切换到UX&#xff…