内容简介:本文收集了我常用的CSS代码片段!
*reset
/** reset **/body, h1, h2, h3, h4, h5, h6, p, ul, ol, dl, dd, form, textarea { margin: 0; }body { font-family: arial, \5b8b\4f53; font-size: 12px; line-height: 1.5; }h1, h2, h3, h4, h5, h6, input, textarea, section { font-size: 100%; }input, textarea, section { font-family: inherit; }ul, ol { padding-left: 0; list-style-type: none; }table{ border-collapse:collapse; border-spacing:0; }th, td { padding: 0; }em,th,var{font-style:normal;}img { border: 0 none; vertical-align:top; }a { text-decoration:none; }a:hover{text-decoration:underline; }
*input兼容
.ipt { border: 1px solid #469021; background: #64A246; color: #fff; font:bold 11px arial,sans-serif; padding: 0.25em 0.5em; text-transform: uppercase; margin: 0; overflow: visible; height: 27px; line-height: 19px; _line-height: 16px; width: 80px;}
*css圆角
.radius { -moz-border-radius: 30px; -webkit-border-radius: 30px; border-radius: 30px;}
*水平翻转
.flipx { -moz-transform:scaleX(-1); -webkit-transform:scaleX(-1); -o-transform:scaleX(-1); transform:scaleX(-1); filter:FlipH();}
*垂直翻转
.flipy { -moz-transform:scaleY(-1); -webkit-transform:scaleY(-1); -o-transform:scaleY(-1); transform:scaleY(-1); filter:FlipV();}
*css旋转
.rotate90 { filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1); -moz-transform: rotate(90deg); -o-transform: rotate(90deg); -webkit-transform: rotate(90deg); transform: rotate(90deg);}
*css盒阴影
.box_shadow { -moz-box-shadow: 3px 3px 4px #000; -webkit-box-shadow: 3px 3px 4px #000; box-shadow: 3px 3px 4px #000; filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=3px, OffY=3px, Color='#000'); -ms-filter: "progid:DXImageTransform.Microsoft.dropshadow(OffX=3px, OffY=3px, Color='#000')";}
*clearfix清浮动
.clearfix:before, .clearfix:after { content:""; display:table; }.clearfix:after{ clear:both; }.clearfix{ *zoom:1;}
*锚点
<a name="link">不能为空</a><a href="#link">锚点链接</a>
*纯CSS三角形
.triangle { width: 0; height: 0; font-size: 0; line-height: 0; border-width: 50px; border-style: solid; border-top-color: #fff; border-right-color: #fff; border-bottom-color: red; border-left-color: #fff;}
*opacity透明
/*opacity*/.opacity { filter: alpha(opacity=50); -khtml-opacity: 0.5; -moz-opacity: 0.5; opacity: 0.5;}
*选择文本颜色
/* 自定义文本选择颜色 */::selection { background: #e2eae2; }::-moz-selection { background: #e2eae2; }::-webkit-selection { background: #e2eae2; }
*全屏背景
/* 全屏背景 */.cover { background: url('bg.jpg') no-repeat center center fixed; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover;}
*强制滚动条
html { height: 101% }
*渐变gradient
/* 渐变 */.gradient { background: #629721; background-image: -webkit-gradient(linear, left top, left bottom, from(#83b842), to(#629721)); background-image: -webkit-linear-gradient(top, #83b842, #629721); background-image: -moz-linear-gradient(top, #83b842, #629721); background-image: -ms-linear-gradient(top, #83b842, #629721); background-image: -o-linear-gradient(top, #83b842, #629721); background-image: linear-gradient(top, #83b842, #629721);}
*font-face
/*font-face*/@font-face { font-family: 'MyWebFont'; src: url('webfont.eot'); /* IE9 Compat Modes */ src: url('webfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('webfont.woff') format('woff'), /* Modern Browsers */ url('webfont.ttf') format('truetype'), /* Safari, Android, iOS */ url('webfont.svg#svgFontName') format('svg'); /* Legacy iOS */}body { font-family: 'MyWebFont', Arial, sans-serif;}
*png透明
/* png透明 */.png { width:200px; height:100px; background: url(this.png) no-repeat; _background:none; _filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='this.png',sizingMethod='crop');/* 路径相对于html */}
*min-height
/* 最小高度 */.minheight { min-height: 550px; height: auto !important; height: 550px;}

htmlattributesearsentialforenhancingwebelements'functionalityandAmpearance.theyaddinformationTodeFineBehavior, 외관 및 간호, WebsITESITERACTIVE, RAPITIVE 및 VVESILLY -CAMENTION.ATTRIBUTESLIKESRC, HREF, 클래스, 유형 및 디스티브 트랜스포트

ToCreateAlistInhtml, useUnorderEdListandForOrdLists : 1) forUnderedList, wrapitemSinanduseForeachitem, renderingasabulletedList.2) forOrderEdlists, useandfornumberedLists, useandfornumberedlists, useandfornumberedlists, useandfornumberedlists, withTheyPeatTributeFferentNumberingStyles.

HTML은 명확한 구조를 가진 웹 사이트를 구축하는 데 사용됩니다. 1) 태그를 사용하여 웹 사이트 구조를 정의하십시오. 2) 예는 블로그 및 전자 상거래 웹 사이트의 구조를 보여줍니다. 3) 잘못된 레이블 중첩과 같은 일반적인 실수를 피하십시오. 4) HTTP 요청을 줄이고 시맨틱 태그를 사용하여 성능을 최적화합니다.

TOINSERTANIMAGEINTOANHTMLPAGE, USETHETAGWITHSRCANDALTATTRIBUTES.1) USEALTTEXTFORACCESSIBLEANDSEO.2) AMPLEMESSRCSETFORRESPONSIVEIMAGES.3) ApplyLazyLoadingWithLoading = "Lazy"TOOPTIMIZEPEROUCTION.4) OPTIMIZEPEPERCESIVEIMAGES

HTML의 핵심 목적은 브라우저가 웹 컨텐츠를 이해하고 표시 할 수 있도록하는 것입니다. 1. HTML은 TO 등과 같은 태그를 통해 웹 페이지 구조와 컨텐츠를 정의합니다. 2. HTML5는 멀티미디어 지원을 향상시키고 소개 및 태그를 향상시킵니다. 3.html은 사용자 상호 작용을 지원하기위한 양식 요소를 제공합니다. 4. HTML 코드를 최적화하면 HTTP 요청 감소 및 HTML 압축과 같은 웹 페이지 성능이 향상 될 수 있습니다.

htmltagsareessentialforwebdevelopmentasthuctureandenhancewebpages.1) thefinelayout, semantics 및 internactivity.2) semantictagsimproveAccessibility 및 sseo.3) appleasoftagscanoptimizeperformanceandenseRocRossercompatiber.

일관된 HTML 인코딩 스타일은 코드의 가독성, 유지 가능성 및 효율성을 향상시키기 때문에 중요합니다. 1) 소문자 태그 및 속성 사용, 2) 일관된 압입 유지, 3) 단일 또는 이중 인용문을 선택하고 고수하십시오. 4) 프로젝트에서 다양한 스타일을 혼합하지 않으십시오.

솔루션 Bootstrap4에서 다중 프로 젝트 회전 목마를 구현하는 것은 부트 스트랩 4에서 멀티 프로 젝트 회전 목마를 구현하는 것은 쉬운 일이 아닙니다. 부트 스트랩 ...


핫 AI 도구

Undresser.AI Undress
사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover
사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool
무료로 이미지를 벗다

Clothoff.io
AI 옷 제거제

Video Face Swap
완전히 무료인 AI 얼굴 교환 도구를 사용하여 모든 비디오의 얼굴을 쉽게 바꾸세요!

인기 기사

뜨거운 도구

PhpStorm 맥 버전
최신(2018.2.1) 전문 PHP 통합 개발 도구

Atom Editor Mac 버전 다운로드
가장 인기 있는 오픈 소스 편집기

WebStorm Mac 버전
유용한 JavaScript 개발 도구

Dreamweaver Mac版
시각적 웹 개발 도구

SublimeText3 Linux 새 버전
SublimeText3 Linux 최신 버전