CSS3 笔记三(Shadow/Text/Web Fonts)
CSS3 Shadow Effects
text-shadowbox-shadow
1> text-shadow
- The text-shadow property adds shadow to text.
- This property accepts a comma-separated list of shadows to be applied to the text.
syntax
text-shadow: h-shadow v-shadow blur-radius color|none|initial|inherit;
Values
| Value |
Description |
|---|---|
| h-shadow | Required. The position of the horizontal shadow. Negative values are allowed |
| v-shadow | Required. The position of the vertical shadow. Negative values are allowed |
| blur-radius | Optional. The blur radius. Default value is 0 |
| color | Optional. The color of the shadow. Look at CSS Color Values for a complete list of possible color values |
| none | Default value. No shadow |
| initial | Sets this property to its default value. |
| inherit | Inherits this property from its parent element. |
Example
h2 {
text-shadow: 0 0 3px #FF0000;
}
h1 {
color: white;
text-shadow: 1px 1px 2px black, 0 0 25px blue, 0 0 5px darkblue;
}
2> box-shadow
- The box-shadow property attaches one or more shadows to an element
box-shadow: none|h-shadow v-shadow blur spread color |inset|initial|inherit;
Values
| Value | Description |
|---|---|
| none | Default value. No shadow is displayed |
| h-shadow | Required. The position of the horizontal shadow. Negative values are allowed |
| v-shadow | Required. The position of the vertical shadow. Negative values are allowed |
| blur | Optional. The blur distance |
| spread | Optional. The size of shadow. Negative values are allowed |
| color | Optional. The color of the shadow. The default value is black. |
| inset | Optional. Changes the shadow from an outer shadow (outset) to an inner shadow |
| initial | Sets this property to its default value. |
| inherit | Inherits this property from its parent element. |
Example
div {
box-shadow: 10px 10px 5px grey;
}
CSS3 Text
text-overflowword-wrapword-break
1> Text-overflow
text-overflow: clip|ellipsis|string|initial|inherit;
Values
| Value | Description |
|---|---|
| clip | Default value. Clips the text |
| ellipsis | Render an ellipsis ("...") to represent clipped text |
| string | Render the given string to represent clipped text |
| initial | Sets this property to its default value. |
| inherit | Inherits this property from its parent element |
2> word-wrap
- The word-wrap property allows long words to be able to be broken and wrap onto the next line.
syntax
word-wrap: normal|break-word|initial|inherit;
| Value | Description |
|---|---|
| normal | Break words only at allowed break points |
| break-word | Allows unbreakable words to be broken |
3> word-break
The word-break property specifies line breaking rules for non-CJK scripts.
syntax
word-break: normal|break-all|keep-all|initial|inherit;q
| Value | Description |
|---|---|
| normal | Default value. Break words according to their usual rules |
| break-all | Lines may break between any two letters |
| keep-all | Breaks are prohibited between pairs of letters |
Web Fonts
- Web fonts allow Web designers to use fonts that are not installed on the user's computer.
- When you have found/bought the font you wish to use, just include the font file on your web server, and it will be automatically downloaded to the user when needed.
- Your "own" fonts are defined within the CSS3
@font-facerule.
Different Font Formats
1> TrueType Fonts (TTF)
2> OpenType Fonts (OTF)
3> The Web Open Font Format (WOFF)
4> The Web Open Font Format (WOFF 2.0)
5> SVG Fonts/Shapes
6> Embedded OpenType Fonts (EOT)
Example
@font-face {
font-family: myFirstFont;
src: url(sansation_light.woff);
}
div {
font-family: myFirstFont;
}
Tip: Always use lowercase letters for the font URL. Uppercase letters can give unexpected results in IE.
CSS3 笔记三(Shadow/Text/Web Fonts)的更多相关文章
- JSP学习笔记(三):简单的Tomcat Web服务器
注意:每次对Tomcat配置文件进行修改后,必须重启Tomcat 在E盘的DATA文件夹中创建TomcatDemo文件夹,并将Tomcat安装路径下的webapps/ROOT中的WEB-INF文件夹复 ...
- 构建高性能WEB站点笔记三
构建高性能WEB站点笔记三 第10章 分布式缓存 10.1数据库的前端缓存区 文件系统内核缓冲区,位于物理内存的内核地址空间,除了使用O_DIRECT标记打开的文件以外,所有对磁盘文件的读写操作都要经 ...
- JAVA WEB学习笔记(三):简单的基于Tomcat的Web页面
注意:每次对Tomcat配置文件进行修改后,必须重启Tomcat 在E盘的DATA文件夹中创建TomcatDemo文件夹,并将Tomcat安装路径下的webapps/ROOT中的WEB-INF文件夹复 ...
- CSS3总结三:文字(text)/字体、文本、文本装饰、多列
Text-Decoration text-shadow text-decoration Font font font-face Text 常用Text属性 Multi-column Multi-col ...
- Mastering Web Application Development with AngularJS 读书笔记(三)
第一章笔记 (三) 一.Factories factory 方法是创建对象的另一种方式,与service相比更灵活,因为可以注册可任何任意对象创造功能.例如: myMod.factory('notif ...
- 学习笔记(三)--->《Java 8编程官方参考教程(第9版).pdf》:第十章到十二章学习笔记
回到顶部 注:本文声明事项. 本博文整理者:刘军 本博文出自于: <Java8 编程官方参考教程>一书 声明:1:转载请标注出处.本文不得作为商业活动.若有违本之,则本人不负法律责任.违法 ...
- 《CMake实践》笔记三:构建静态库(.a) 与 动态库(.so) 及 如何使用外部共享库和头文件
<CMake实践>笔记一:PROJECT/MESSAGE/ADD_EXECUTABLE <CMake实践>笔记二:INSTALL/CMAKE_INSTALL_PREFIX &l ...
- VSTO学习笔记(三) 开发Office 2010 64位COM加载项
原文:VSTO学习笔记(三) 开发Office 2010 64位COM加载项 一.加载项简介 Office提供了多种用于扩展Office应用程序功能的模式,常见的有: 1.Office 自动化程序(A ...
- Django开发笔记三
Django开发笔记一 Django开发笔记二 Django开发笔记三 Django开发笔记四 Django开发笔记五 Django开发笔记六 1.基于类的方式重写登录:views.py: from ...
随机推荐
- linux内核分析作业4:使用库函数API和C代码中嵌入汇编代码两种方式使用同一个系统调用
系统调用:库函数封装了系统调用,通过库函数和系统调用打交道 用户态:低级别执行状态,代码的掌控范围会受到限制. 内核态:高执行级别,代码可移植性特权指令,访问任意物理地址 为什么划分级别:如果全部特权 ...
- 【iCore3双核心板】发布 iCore3 应用开发平台用户手册
PDF手册下载地址:http://pan.baidu.com/s/1miBBYi8 iCore3应用开发平台购买地址:https://item.taobao.com/item.htm?spm=a1z1 ...
- PHPExcel中文开发手册翻译版(1)
请注意这个是粗翻译版,仅供参考,不是精校版 精校版后面才会更新 英文原版在线文档 https://github.com/PHPOffice/PHPExcel/wiki/User%20Documenta ...
- Sublime Text安装Package Control
原来Sublime Text3安装Package Control很麻烦,现在简单的方法来了! 一.简单的安装方法 使用Ctrl+`快捷键或者通过View->Show Console菜单打开命令行 ...
- nginx服务器配置
nginx主要配置 #定义Nginx运行的用户和用户组user www www; #每个worker进程绑定到指定CPU ,均衡各CPU 负载worker_cpu_affinity 000000000 ...
- 利用jemalloc优化mysql
一.下载安装jemalloc #wget http://www.canonware.com/download/jemalloc/jemalloc-3.6.0.tar.bz2 #tar jxvf jem ...
- 掌握Thinkphp3.2.0----视图
我们将要学习一下 ThinkPHP 视图,视图是 Web 的可见内容,一般是 HTML结合 PHP 获取的数据提供给用户使用的部分,属于 MVC 中的 V 一. 模版定义 默认的模版文件定义规则:视图 ...
- windows下mysqlbinlog二进制恢复
Mysql数据恢复主要针对Windows游戏引擎服务器意外宕机,以及游戏出现重大BUG,导致需要回档. 注意:请在恢复数据库之前,备份目标数据库,切记! 一.Windows服务器意外DOWN机,数据库 ...
- markdown命令语法
markDown作为一款很好用的文档编写工具,具体的用法如下: # Markdown syntax---**粗体***斜体****粗体加斜体*** > 引用>> 二级引用 # 一级标 ...
- Python基础、异常处理
一.概述 错误与异常概念 异常也是对象, 基于Exception类.内置异常 异常处理.流程 try/except/else 处理python或你触发的异常 try/fianlly 不管有没有异 ...