css小技巧 - 我_爱编程
网页字体:
font-size: 16px;<span style="color: #800000;">font-family: "Microsoft Yahei", Arial, Helvetica, sans-serif; 网络常用来显高大上的名言警句字体 </span>
<span style="color: #800000;">font: 12px "宋体", Arial, Helvetica, sans-serif; 普通内容字体<br><span class="styles-clipboard-only"> <span class="webkit-css-property">color: <span class="expand-element"><span class="value"><span><span class="color-swatch"><span class="color-swatch-inner">#474645; 内容小标题 以及内容<br> line-height: 20px 内容行高<br></span></span></span></span></span></span></span></span>
- font-weight:
- color:
- background:
<span style="color: #800000;"> </span>
选择器:
<span style="color: #800000;">.texts p:nth-child(2)</span>{}<span style="color: #800000;"> :取texts 类下的第二个p :hover </span>{}<span style="color: #800000;">:当鼠标移到</span>
动画控制:
<span style="color: #008000;">/*</span><span style="color: #008000;"> -webkit-transition: all 1s; </span><span style="color: #008000;">*/</span><span style="color: #800000;"> -moz-transition: all 1s; -o-transition: all 1s; transition: all 1s; /*动画共1秒 </span><span style="color: #008000;">/*</span><span style="color: #008000;"> -webkit-transform: translate(60px); </span><span style="color: #008000;">*/</span><span style="color: #800000;"> -moz-transform: translate(60px); /*沿x轴向右移60px*/ -o-transform: translate(60px); -ms-transform: translate(60px); </span><span style="color: #008000;">/*</span><span style="color: #008000;"> transform: translate(60px); </span><span style="color: #008000;">*/<br></span><span style="color: #888888;">-moz-transform: scale(1.1) 图片放大</span><span style="color: #008000;"><br><br></span>
整体效果调整:
<span style="color: #800000;">letter-spacing: 2px; 字与字间隔2px text-shadow:0px 1px rgba(255,255,255,0.3) 字阴影 box-shadow: #999 4px 5px 1px; 块区域阴影<br>overflow: hidden; 多余部分隐藏<br></span>border-radius: 100%;<span style="line-height: 1.5;">overflow: </span><span style="line-height: 1.5;">hidden; 变成圆形后 ,需设置内容隐藏<br><span class="webkit-css-property">border-radius: <span class="expand-element"><span class="value">0 20px 20px 0; 右半圆<br><span class="styles-clipboard-only"> <span class="webkit-css-property">box-shadow: <span class="expand-element"><span class="value">-2px -1px 5px <span><span class="color-swatch"><span class="color-swatch-inner">#666;</span></span></span></span></span></span></span><br></span></span></span><br></span>
<span style="color: #800000;"> </span>
扩展知识:
<span style="color: #800000;">line-height: 28px; 为达效果,当高度不能更改时,可以试着用行高<br><span class="webkit-css-property">display: <span class="expand-element"><span class="value">block 如果未达效果,试着设置</span></span></span><br><span style="font-size: 13px;"><strong><span class="styles-clipboard-only"><span class="webkit-css-property">border-bottom: <span class="expand-element"><span class="value"><span class="color-swatch"><span class="color-swatch-inner">#474645 2px solid; 画一条线<br>margin: 0 20px 20px 20px 上 右 下 左<br></span></span></span></span></span></span></strong></span></span><strong>margin: 20px auto 上下 左右<br></strong><strong>margin: 20px 20px </strong><strong> 20px 上 左右 下<br>阅读全文>> 伪元素:给部分整体前添加 元素 并控制</strong>
<span style="color: #800000;">.blogs::before </span>{<span style="color: #ff0000;"> content</span>:<span style="color: #0000ff;"> ""</span>;<span style="color: #ff0000;"> width</span>:<span style="color: #0000ff;"> 10px</span>;<span style="color: #ff0000;"> height</span>:<span style="color: #0000ff;"> 10px</span>;<span style="color: #ff0000;"> border-radius</span>:<span style="color: #0000ff;"> 50%</span>;<span style="color: #ff0000;"> position</span>:<span style="color: #0000ff;"> absolute</span>;<span style="color: #ff0000;"> background</span>:<span style="color: #0000ff;"> #cac1c1</span>;<span style="color: #ff0000;"> border</span>:<span style="color: #0000ff;"> 2px solid #fff</span>;<span style="color: #ff0000;"> left</span>:<span style="color: #0000ff;"> -27px</span>;<span style="color: #ff0000;"> -webkit-transition</span>:<span style="color: #0000ff;"> all 1s</span>;<span style="color: #ff0000;"> -moz-transition</span>:<span style="color: #0000ff;"> all 1s</span>;<span style="color: #ff0000;"> -o-transition</span>:<span style="color: #0000ff;"> all 1s</span>;<span style="color: #ff0000;"> transition</span>:<span style="color: #0000ff;"> all 1s</span>; }<span style="color: #800000;"> .blogs:hover::before </span>{<span style="color: #ff0000;"> background</span>:<span style="color: #0000ff;"> #474645 </span>}<span style="color: #800000;"> .dateview </span>{<span style="color: #ff0000;"> position</span>:<span style="color: #0000ff;"> absolute</span>;<span style="color: #ff0000;"> left</span>:<span style="color: #0000ff;"> -125px</span>;<span style="color: #ff0000;"> top</span>:<span style="color: #0000ff;"> 0px</span>;<span style="color: #ff0000;"> z-index</span>:<span style="color: #0000ff;"> 1</span>;<span style="color: #ff0000;"> color</span>:<span style="color: #0000ff;"> #F5F5F5</span>; }<span style="color: #800000;"> .blogs::after </span>{<span style="color: #ff0000;"> content</span>:<span style="color: #0000ff;"> ""</span>;<span style="color: #ff0000;"> width</span>:<span style="color: #0000ff;"> 121px</span>;<span style="color: #ff0000;"> height</span>:<span style="color: #0000ff;"> 29px</span>;<span style="color: #ff0000;"> position</span>:<span style="color: #0000ff;"> absolute</span>;<span style="color: #ff0000;"> left</span>:<span style="color: #0000ff;"> -148px</span>;<span style="color: #ff0000;"> top</span>:<span style="color: #0000ff;"> -9px</span>;<span style="color: #ff0000;"> z-index</span>:<span style="color: #0000ff;"> 0</span>;<span style="color: #ff0000;"> background</span>:<span style="color: #0000ff;"> #474645 url(../images/ti.png) no-repeat</span>;<span style="color: #ff0000;"> opacity</span>:<span style="color: #0000ff;"> 0</span>;<span style="color: #ff0000;"> -webkit-transition</span>:<span style="color: #0000ff;"> all 1s</span>;<span style="color: #ff0000;"> -moz-transition</span>:<span style="color: #0000ff;"> all 1s</span>;<span style="color: #ff0000;"> -o-transition</span>:<span style="color: #0000ff;"> all 1s</span>;<span style="color: #ff0000;"> transition</span>:<span style="color: #0000ff;"> all 1s</span>; }<span style="color: #800000;"> .blogs:hover::after </span>{<span style="color: #ff0000;"> opacity</span>:<span style="color: #0000ff;"> 1 </span>}<br>或者:
<span style="color: #800000;">a:before </span>{ <code>content: " (" attr(href) ")";</code>}
a伪元素
<span style="color: #800000;">选择未访问、已访问、悬浮和活动链接,并设置它们的样式: a:link </span>{<span style="color: #ff0000;">color</span>:<span style="color: #0000ff;">blue</span>;}<span style="color: #800000;"> a:visited </span>{<span style="color: #ff0000;">color</span>:<span style="color: #0000ff;">blue</span>;}<span style="color: #800000;"> a:hover </span>{<span style="color: #ff0000;">color</span>:<span style="color: #0000ff;">red</span>;}<span style="color: #800000;"> a:active </span>{<span style="color: #ff0000;">color</span>:<span style="color: #0000ff;">yellow</span>;}
结尾:给自己的的页面设置分享按钮 例如:分享到QQ 、新浪 、人人、微信 等等
分享按钮-百度分享
它会告诉你

Outils d'IA chauds

Undresser.AI Undress
Application basée sur l'IA pour créer des photos de nu réalistes

AI Clothes Remover
Outil d'IA en ligne pour supprimer les vêtements des photos.

Undress AI Tool
Images de déshabillage gratuites

Clothoff.io
Dissolvant de vêtements AI

AI Hentai Generator
Générez AI Hentai gratuitement.

Article chaud

Outils chauds

Bloc-notes++7.3.1
Éditeur de code facile à utiliser et gratuit

SublimeText3 version chinoise
Version chinoise, très simple à utiliser

Envoyer Studio 13.0.1
Puissant environnement de développement intégré PHP

Dreamweaver CS6
Outils de développement Web visuel

SublimeText3 version Mac
Logiciel d'édition de code au niveau de Dieu (SublimeText3)

Sujets chauds

L'article traite du HTML & lt; Datalist & GT; élément, qui améliore les formulaires en fournissant des suggestions de saisie semi-automatique, en améliorant l'expérience utilisateur et en réduisant les erreurs. COMMANDE COMPRES: 159

L'article traite du HTML & lt; Progress & GT; élément, son but, son style et ses différences par rapport au & lt; mètre & gt; élément. L'objectif principal est de l'utiliser & lt; Progress & gt; pour l'achèvement des tâches et & lt; mètre & gt; pour stati

L'article traite du HTML & lt; mètre & gt; élément, utilisé pour afficher des valeurs scalaires ou fractionnaires dans une plage, et ses applications courantes dans le développement Web. Il différencie & lt; mètre & gt; De & lt; Progress & gt; et ex

L'article traite du & lt; iframe & gt; L'objectif de Tag dans l'intégration du contenu externe dans les pages Web, ses utilisations courantes, ses risques de sécurité et ses alternatives telles que les balises d'objet et les API.

L'article traite de la balise Meta de la fenêtre, essentielle pour la conception Web réactive sur les appareils mobiles. Il explique comment une utilisation appropriée garantit une mise à l'échelle optimale du contenu et une interaction utilisateur, tandis que la mauvaise utilisation peut entraîner des problèmes de conception et d'accessibilité.

L'article discute de l'utilisation des attributs de validation de formulaire HTML5 comme les limites requises, motifs, min, max et longueurs pour valider la saisie de l'utilisateur directement dans le navigateur.

L'article examine les meilleures pratiques pour assurer la compatibilité des navigateurs de HTML5, en se concentrant sur la détection des fonctionnalités, l'amélioration progressive et les méthodes de test.

Cet article explique le html5 & lt; time & gt; élément de représentation sémantique de date / heure. Il souligne l'importance de l'attribut DateTime pour la lisibilité à la machine (format ISO 8601) à côté du texte lisible par l'homme, stimulant AccessIbilit
