Home Web Front-end HTML Tutorial css设置_html/css_WEB-ITnose

css设置_html/css_WEB-ITnose

Jun 24, 2016 am 11:18 AM

<strong>box-size<br /></strong>允许您以特定的方式定义匹配某个区域的特定元素。<br /><br />content-box(默认):宽度和高度分别应用到元素的内容框。在宽度和高度之外绘制元素的内边距和边框。<br />border-box:为元素设定的宽度和高度决定了元素的边框盒。<br />inherit:规定应从父元素继承 box-sizing 属性的值。
Copy after login
box-sizing:border-box;-moz-box-sizing:border-box; /* Firefox */-webkit-box-sizing:border-box; /* Safari */<br /><br />
Copy after login
<strong>-webkit-tap-highlight-color</strong><br />当用户点击iOS的Safari浏览器中的链接或JavaScript的可点击的元素时,覆盖显示的高亮颜色。<br /><br />color:颜色值(默认inherit)<br />transparent:透明值
Copy after login
<br /><strong>-webkit-font-smoothing</strong><br />使页面上的字体抗锯齿,使用后字体看起来会更清晰舒服。<br /><br />none:对低像素的文本比较好 <br />subpixel-antialiased:默认值<br />antialiased:抗锯齿很好 <br /><br /><strong>解决字体图标锯齿问题</strong><br />-webkit-font-smoothing: antialiased;<br />-moz-osx-font-smoothing: grayscale;<br /><br />
Copy after login
<strong>多栏多列布局</strong>
Copy after login
父元素:<br />display: -webkit-flex;<br />-webkit-flex-flow: row;-webkit-align-items: stretch;-webkit-justify-content:space-between;    /*IE10还不支持*/display: -ms-flex;-ms-flex-flow: row wrap;-ms-align-items: stretch;-ms-justify-content:space-between;	display: flex;flex-flow: row;align-items: stretch;justify-content:space-between;
Copy after login
flex-flow:row      伸缩项目排列由左向右排列<br />           column   伸缩项目排列由上至下排列
Copy after login
align-items:flex-start 弹性盒子元素的侧轴(纵轴)起始位置的边界紧靠住该行的侧轴起始边界。<br />             flex-end   弹性盒子元素的侧轴(纵轴)起始位置的边界紧靠住该行的侧轴结束边界。<br />             center     弹性盒子元素在该行的侧轴(纵轴)上居中放置。(如果该行的尺寸小于弹性盒子元素的尺寸,则会向两个方向溢出相同的长度)。<br />             baseline   如弹性盒子元素的行内轴与侧轴为同一条,则该值与'flex-start'等效。其它情况下,该值将参与基线对齐。<br />             stretch    如果指定侧轴大小的属性值为'auto',则其值会使项目的边距盒的尺寸尽可能接近所在行的尺寸,但同时会遵照'min/max-width/height'属性的限制。
Copy after login
justify-content:flex-start   (默认值)项目位于容器的开头。 <br />                 flex-end      项目位于容器的结尾。<br />                 center        项目位于容器的中心。 <br />                 space-between 项目位于各行之间留有空白的容器内。 <br />                 space-around  项目位于各行之前、之间、之后都留有空白的容器内。 <br />                 initial       设置该属性为它的默认值。<br />                 inherit       从父元素继承该属性。<br /><br />子元素
Copy after login
flex<br />相对于同一容器其他灵活的项目,规定项目的长度。<br />语法<br />flex: flex-grow  flex-shrink  flex-basis|auto|initial|inherit;<br />flex:flex-grow    一个数字,规定项目将相对于其他灵活的项目进行扩展的量。 <br />     flex-shrink  一个数字,规定项目将相对于其他灵活的项目进行收缩的量。<br />     flex-basis   项目的长度。合法值:"auto"、"inherit" 或一个后跟 "%"、"px"、"em" 或任何其他长度单位的数字。<br />     auto         与 1 1 auto 相同。<br />     none         与 0 0 auto 相同。<br />     initial      设置该属性为它的默认值,即为 0 1 auto。<br />     inherit      从父元素继承该属性
Copy after login
-webkit-flex:1;<br />-moz-flex:1;<br />flex:1;<br /><br /><strong>text-transform</strong><br />控制文本的大小写。<br />none       默认。定义带有小写字母和大写字母的标准的文本。<br />capitalize 文本中的每个单词以大写字母开头。<br />uppercase 定义仅有大写字母。<br />lowercase 定义无大写字母,仅有小写字母。<br />inherit 规定应该从父元素继承 text-transform 属性的值。         
Copy after login
<br />white-space <br />属性设置如何处理元素内的空白。<br />normal    默认。空白会被浏览器忽略。<br />pre       空白会被浏览器保留。其行为方式类似 HTML 中的 <pre class="brush:php;toolbar:false"> 标签。 <br />nowrap    文本不会换行,文本会在在同一行上继续,直到遇到 <br> 标签为止。 <br />pre-wrap  保留空白符序列,但是正常地进行换行。 <br />pre-line  合并空白符序列,但是保留换行符。<br />inherit   规定应该从父元素继承 white-space 属性的值。
Copy after login

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

What is the purpose of the <datalist> element? What is the purpose of the <datalist> element? Mar 21, 2025 pm 12:33 PM

The article discusses the HTML &lt;datalist&gt; element, which enhances forms by providing autocomplete suggestions, improving user experience and reducing errors.Character count: 159

How do I use HTML5 form validation attributes to validate user input? How do I use HTML5 form validation attributes to validate user input? Mar 17, 2025 pm 12:27 PM

The article discusses using HTML5 form validation attributes like required, pattern, min, max, and length limits to validate user input directly in the browser.

What is the purpose of the <progress> element? What is the purpose of the <progress> element? Mar 21, 2025 pm 12:34 PM

The article discusses the HTML &lt;progress&gt; element, its purpose, styling, and differences from the &lt;meter&gt; element. The main focus is on using &lt;progress&gt; for task completion and &lt;meter&gt; for stati

What is the purpose of the <iframe> tag? What are the security considerations when using it? What is the purpose of the <iframe> tag? What are the security considerations when using it? Mar 20, 2025 pm 06:05 PM

The article discusses the &lt;iframe&gt; tag's purpose in embedding external content into webpages, its common uses, security risks, and alternatives like object tags and APIs.

What is the purpose of the <meter> element? What is the purpose of the <meter> element? Mar 21, 2025 pm 12:35 PM

The article discusses the HTML &lt;meter&gt; element, used for displaying scalar or fractional values within a range, and its common applications in web development. It differentiates &lt;meter&gt; from &lt;progress&gt; and ex

What are the best practices for cross-browser compatibility in HTML5? What are the best practices for cross-browser compatibility in HTML5? Mar 17, 2025 pm 12:20 PM

Article discusses best practices for ensuring HTML5 cross-browser compatibility, focusing on feature detection, progressive enhancement, and testing methods.

What is the viewport meta tag? Why is it important for responsive design? What is the viewport meta tag? Why is it important for responsive design? Mar 20, 2025 pm 05:56 PM

The article discusses the viewport meta tag, essential for responsive web design on mobile devices. It explains how proper use ensures optimal content scaling and user interaction, while misuse can lead to design and accessibility issues.

How do I use the HTML5 <time> element to represent dates and times semantically? How do I use the HTML5 <time> element to represent dates and times semantically? Mar 12, 2025 pm 04:05 PM

This article explains the HTML5 &lt;time&gt; element for semantic date/time representation. It emphasizes the importance of the datetime attribute for machine readability (ISO 8601 format) alongside human-readable text, boosting accessibilit

See all articles