博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
图像和超链接
阅读量:3942 次
发布时间:2019-05-24

本文共 125941 字,大约阅读时间需要 419 分钟。

图像和超链接

添加图像

图像的基本格式

我们今天所看到的网页之所以越来越丰富多彩,是因为添加了各种各样的图像,对网页进行了美化。当前万维网.上流行的图像格式以GIF及JPEG为主,还有一种PNG格式的图像文件也越来越多地被应用于网络中。以下分别对这3种图像格式的特点进行介绍。

1. GIF格式

GIF格式采用LZW压缩,是通过压缩相同颜色的色块来使图像文件变小的。由于LZW压缩不会造成任何品质上的损失,而且压缩效率高,再加上GIF格式在各种平台上都可以使用,所以很适合在互联网上使用,但它只能处理256色。

GIF格式适合商标、新闻式的标题或其他小于256色的图像。

LZW压缩是一种能将数据中重复的字符串加以编码制作成数据流的压缩法,通常应用于GIF图像文件的压缩。

2. JPEG格式

对于照片之类全彩的图像,通常以JPEG格式来进行压缩,也可以说,JPEG 格式通常用来保存超过256色的图像。JPEG的压缩过程会造成一些图像数据的损失,所造成的“损失”是剔除了一些视觉上不容易觉察的部分。如果剔除适当,则不但在视觉上能够接受,而且图像的压缩效率也会提高,使图像文件变小;反之,剔除太多图像数据,则会造成图像过度失真。

3. PNG格式

PNG格式是一种非破坏性的网页图像文件格式,它提供了将图像文件以最小的方式压缩却又不造成图像失真的技术。它不仅具备GIF图像格式的大部分优点,而且还支持48 bit的色彩、更快的交错显示、跨平台的图像亮度控制、更多层的透明度设置。

添加图像的方法

有了图像文件之后,就可以使用< img>标签将图像插入网页中,从而达到美化页面的效果。

其语法格式如下:

其中,src 用来设置图像文件所在的地址,这一路径可以是相对地址,也可以是绝对地址。

绝对地址就是主页上的文件或目录在硬盘上的真正路径,如路径“D:\5-1.jpg”。 使用绝对路径定位链接目标文件比较清晰,但是这样做有两个缺点:一是需 要输入更多的内容;二是如果该文件被移动了,就需要重新设置所有的相关链接。例如,在本地测试网页时链接全部可用,但是到了互联网上就不可用了。

相对地址是最适合网站的内部文件引用的。只要是属于同一网站之下的,即使不在同一个目录下,相对地址也非常适用。只要处于站点文件夹之内,相对地址可以自由地在文件之间构建链接。这种地址形式利用的是构建链接的两个文件之间的相对关系不受站点文件夹所处服务器位置的影响。因此,这种书写形式省略了绝对地址中的相同部分。这样做的优点是,在站点文件夹所在服务器地址发生改变时,文件夹中的所有内部文件地址都不会出问题。

相对地址的使用方法为:

如果要引用的文件位于该文件的同一目录中,则只需输入要链接文档的名称即可,如5-1 jpg。

如果要引用的文件位于该文件的下一级目录中,则先输入目录名,然后加“1",再输入文件名,如img/5-2.jpg。

如果要引用的文件位于该文件的上一-级目录中,则先输入“./”", 再输入目录名、文件名,如…/img/5-2.jpg。

下面列举一个实例。在HTML页面中,首先使用< h2>标签 添加网页标题,然后分别使用< p>和< img>标签添加文本和图片,实现五子棋游戏简介的页面展示。

    
设置图像与文字的相对位置

五子棋游戏简介

  《五子棋》是由明日科技研发的一款老少皆宜的休闲类棋牌游戏。其起源于中国古代传统的黑白棋中之一,玩起来妙趣横生,引人入胜,不仅能增强思维能力,而且可以富含哲理,有助于修身养性。

游戏规则:

  玩游戏时,既可以随机匹配玩家,也可以与朋友对弈,或者无聊时选择人机对弈。画面简单大方。游戏中,最先在棋盘的横向、纵向或斜向形成连续的相同的五个棋子的一方为胜。

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-J7WN0u1V-1586080107039)(C:\Users\Jsck\Desktop\Web+Html+Css+JavaScript\第 1 篇:HTML 5 篇\3.图像和超链接\web1.png)]

设置图像属性

图像大小与边框

在网页中直接插入图像时,图像的大小和原图是相同的,而在实际应用时可以通过各种图像属性的设置调整图像的大小、分辨率等。

1.调整图像大小

在< img>标签中,通过height 和width属性可以设置图像的高度和宽度。其语法格式如下:

height: 用于设置图像的高度,单位是像素,可以省略。

width:用于设置图像的宽度,单位是像素,可以省略。

说明: 在设置图像大小时,如果只设置了高度或宽度,则另一个参数会按照相同比例进行调整。如果同时设置了两个属性,且缩放比例不同,那么图像很可能会变形。

2.设置图像边框一border

在默认情况下,页面中插入的图像是没有边框的,但是可以通过border属性为图像添加边框。其语法格式如下:

其中,border 用于设置图像边框的大小,单位是像素。

下面列举一个实例。在商品详情页面中添加两张手机图片,其中一张设置宽、高均为350像素,另一张设置宽、高均为50像素,并为其添加边框。

  • index.html
添加图像
  • css/mr-style.css
@charset "utf-8";.mr-content{
width: 1100px; height:420px; border: 1px solid red; margin: 0 auto; background: url(../images/bg.jpg) no-repeat right top; text-align: left;}

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-cwhaB3ph-1586080107040)(C:\Users\Jsck\Desktop\Web+Html+Css+JavaScript\第 1 篇:HTML 5 篇\3.图像和超链接\web2.png)]

说明:在实例中运用了< div>标签,< div>标签是HTML中一种常用的块级元素,使用它可以在CSS中方便地设置其宽高及内外边距等样式。另外,本实例还运用CSS给页面添加背景图片、设置页面内容居中。

图像间距与对齐方式

HTML5中不仅有用于添加图像的标签,而且还可以调整图像在页面中的间距和对齐方式,从而改变图像的位置。

1.调整图像间距

如果不使用

标签进行换行显示,那么添加的图像会紧跟在文字之后。但是,通过hspace和vspace属性可以调整图像与文字之间的距离,使文字和图像的排版不那么拥挤,看上去更加协调。其语法格式如下:

hspace: 用于设置图像的水平间距,单位是像素,可以省略。

vspace: 用于设置图像的垂直间距,单位是像素,可以省略。

2.设置图像相对于文字基准线的对齐方式

图像和文字之间的排列通过align属性来调整。其对齐方式可以分为两类,即绝对对齐方式和相对文字对齐方式。其中,绝对对齐方式包括左对齐、右对齐和居中对齐3种;而相对文字对齐方式则是指图像与一行文字的相对位置。其语法格式如下:

align的取值 含义
top 把图像的顶部和同行的最高部分对齐(可能是文本的顶部,也可能是图像的顶部)
middle 把图像的中部和行的中部对齐(通常是文本行的基线,并不是实际的行的中部)
bottom 把图像的底部和同行文本的底部对齐
absmiddle 把图像的中部和同行中最大项的中部对齐
baseline 把图像的底部和文本的基线对齐
absbottom 把图像的底部和同行中的最低项对齐
left 使图像和左边界对齐(文本环绕图像)
right 使图像和右边界对齐(文本环绕图像)

下面列举一个实例,在头像选择页面中插入两行供选择的头像图片,并且设置图像与同行文字的中部对齐

设置图像的水平间距

请选择您喜欢的头像:


第一组人物头像
第二组人物头像

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-NqVUjXlA-1586080107040)(C:\Users\Jsck\Desktop\Web+Html+Css+JavaScript\第 1 篇:HTML 5 篇\3.图像和超链接\web3.png)]

提示文字与替换文本

在HTML中,可以通过为图像设置提示文字和替换文本来添加提示信息。其中,提示文字在鼠标指针悬停在图像上时显示;而替换文本在图像无法正常显示时显示,用以告知用户这是一张什么图片。

1.添加图像的提示文字一 title

通过title属性可以为图像设置提示文字。在浏览网页时,如果图像下载完成,则将鼠标指针放在该图像上,鼠标指针旁边会出现提示文字。也就是说,当鼠标指针悬停在图像上时,稍等片刻,可以出现图像的提示文字,用于说明或描述图像。其语法格式如下:

其中,title 后面的双引号中的内容为图像的提示文字。

2.添加图像的替换文本一alt

当图片由于下载或路径的问题无法显示时,可以通过alt属性在图片的位置显示定义的替换文本。其语法格式如下:

其中,alt后面的双引号中的内容为图像的替换文本。

说明: 在上面的语法中,提示文字和替换文本的内容可以是中文,也可以是英文

下面列举一个实例,在五子棋游戏简介页面中,为图片添加提示文字与替换文本。

    
提示文字与替换文本

五子棋游戏简介

  《五子棋》是由明日科技研发的一款老少皆宜的休闲类棋牌游戏。其起源于中国古代传统的黑白棋中之一,玩起来妙趣横生,引人入胜,不仅能增强思维能力,而且可以富含哲理,有助于修身养性。

游戏规则:

  玩游戏时,既可以随机匹配玩家,也可以与朋友对弈,或者无聊时选择人机对弈。画面简单大方。游戏中,最先在棋盘的横向、纵向或斜向形成连续的相同的五个棋子的一方为胜。

游戏大厅 五子棋欢迎界面

编辑完代码后,在浏览器中运行,显示页面效果如图所示。可以看到,左边图片由于图片格式错误,无法正常显示,所以在图片位置显示替换文本“游戏大厅”;而将鼠标指针放置在第二张图片上时,图片上会显示提示文字“欢迎体验五子棋游戏”。

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-PoqbPHwZ-1586080107041)(C:\Users\Jsck\Desktop\Web+Html+Css+JavaScript\第 1 篇:HTML 5 篇\3.图像和超链接\web4.png)]

链接标签

链接(Link),全称为超文本链接,也称为超链接,是HTML的一个很强大和非常有价值的功能。它可以实现将文档中的文字或图像与另一个文档、文档的一部分 或一幅图像链接在一起。一个网站是由多个页面组成的,页面之间依据链接确定相互的导航关系。当在浏览器中单击这些对象时,浏览器可以根据指示载入一个新的页面或转到页面的其他位置。常用的链接分为文本链接和书签链接。”下 面具体介绍这两种链接的使用方法。

文本链接

在网页中,文本链接是最常见的一种。 它通过网页中的文件和其他的文件进行链接。语法格式如下:

链接文字

href: 链接地址,是Hypertext Reference的缩写。

target: 打开新窗口的方式,主要有以下4个属性值。

➢_ blank: 新建一个窗口打开。		➢_ parent: 在上- -级窗口中打开,常在分帧的框架页面中使用。		➢_ self: 在同一窗口中打开,默认值。		➢_ top: 在浏览器的整个窗口中打开,将会忽略所有的框架结构。

说明:在该语法中,链接地址可以是绝对地址,也可以是相对地址。

下面列举一个实例,在页面中添加文字导航和图像,并且通过标签为每个导航栏添加超链接。

  • index.html
    
超链接
51购商城   
首页   
手机酷玩   
精品抢购   
手机配件
  • css/style.css
@charset "UTF-8";/*css document*/.mr-cont{
width: 800px; margin: 0 auto;}a{
text-decoration: none;}
  • link.html
    
超链接

欢迎来到51购商城

点击此处返回主页

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-VO7F9uF1-1586080107042)(C:\Users\Jsck\Desktop\Web+Html+Css+JavaScript\第 1 篇:HTML 5 篇\3.图像和超链接\web5.png)]

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-oh9echjS-1586080107042)(C:\Users\Jsck\Desktop\Web+Html+Css+JavaScript\第 1 篇:HTML 5 篇\3.图像和超链接\web6.png)]

书签链接

在浏览页面的时候,如果页面的内容较多,且页面过长,则需要不断拖动滚动条,很不方便;如果要寻找特定的内容,就更不方便了。这时如果能在该网页或另一个页面上建立目录,那么浏览者只要单击目录上的项目就能自动跳转到网页相应的位置进行阅读,这样无疑是最方便的事,并且还可以在页面中设定诸如“返回页首”之类的链接。这就称为书签链接。

建立书签链接分为两步: 一是建立书签;二是为书签制作链接。

下面列举一个实例,在网页中添加书签链接,当用户单击文字时,页面跳转到相应位置。

(1)建立书签。分别为每-一版块位置后面的文字(如“华为荣耀”“华为p8”等)建立书签。部分代码如下:

  • index.html
建立书签链接
  • css/mr-style.css
@charset "utf-8";/* CSS Document */* {
margin: 0; padding: 0}.mr-cont {
margin: 20px auto; height: 3080px; width: 1060px; border: 1px solid #f00; background: rgba(192,192,192,0.4)}.mr-top {
padding: 20px auto; height: 500px}.mr-nav {
width: 1000px; height: 30px}.mr-nav ul {
margin-left: 67px; height: 37px; width: 945px; list-style: none; background: #C03; text-align: center}.mr-nav ul li {
float: left; margin: 7px auto; width: 150px; font-size: 20px}.mr-nav ul li a {
color: #FFF; font-weight: 900}.mr-phone {
margin: 5px 0; height: 490px}.rongyao {
background: rgba(0,255,255,0.3);}.mate8 {
background: rgba(255,223,0,0.2)}.p8 {
background: rgba(255,144,0,0.2)}.huawei {
background: rgba(255,0,96,0.2)}.g9 {
background: rgba(144,0,255,0.2)}.mr-txt {
margin-left: 50px; height: 560px; width: 975px}.mr-pic {
margin: 20px 20px; float: left; border: 1px solid #9c9c9c}.mr-pic img{
width: 200px; height: auto;}a {
text-decoration: none}.mr-banner {
margin-left: 67px}

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-WhTmbJEp-1586080107043)(C:\Users\Jsck\Desktop\Web+Html+Css+JavaScript\第 1 篇:HTML 5 篇\3.图像和超链接\web7.png)]

(2)为网页导航部分的书签制作链接,代码如下:

  • index-info.html
    
建立书签链接

点击文字,页面跳转到不同位置

书签可以与链接文字在同一页面,也可以在不同的页面。但是实现网页内部的书签链接,都需要先建立书签。通过建立书签才能对页面的内容进行引导和跳转。


效果
源码
源码

HTML

<div></div> &lt;div class="mr-cont"&gt; &lt;div class="mr-top"&gt; &lt;a name="top"&gt;&lt;div class="mr-nav"&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="#rongyao"&gt;华为荣耀&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#mate8"&gt;华为mate8&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#huaweip8"&gt;华为p8&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#huawei5c"&gt;华为5c&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#huaweig9"&gt;华为g9&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;img class="mr-banner"src="images/bnr.jpg"width='1030' height="430"&gt;&lt;/a&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="mr-txt"&gt; &lt;h5&gt;&amp;nbsp;位置:&lt;a name="rongyao"&gt;华为荣耀&lt;/a&gt;&lt;a href="#top"&gt;&gt;&gt;回到顶部&lt;/a&gt;&lt;/h5&gt; &lt;div class="mr-phone rongyao"&gt; &lt;div class="mr-pic"&gt;&lt;img src="images/ry1.jpg" alt=""&gt;&lt;/div&gt; &lt;div class="mr-pic"&gt;&lt;img src="images/z5.jpg" alt=""&gt;&lt;/div&gt; &lt;div class="mr-pic"&gt;&lt;img src="images/z7.jpg" alt=""&gt;&lt;/div&gt; &lt;div class="mr-pic"&gt;&lt;img src="images/ry4.jpg" alt=""&gt;&lt;/div&gt; &lt;div class="mr-pic"&gt;&lt;img src="images/ry5.jpg" alt=""&gt;&lt;/div&gt; &lt;div class="mr-pic"&gt;&lt;img src="images/ry6.jpg" alt=""&gt;&lt;/div&gt; &lt;div class="mr-pic"&gt;&lt;img src="images/ry7.jpg" alt=""&gt;&lt;/div&gt; &lt;div class="mr-pic"&gt;&lt;img src="images/ry8.jpg" alt=""&gt;&lt;/div&gt; &lt;/div&gt; &lt;h5&gt;&amp;nbsp;位置:&lt;a name="mate8"&gt;华为mate8&lt;a href="#top"&gt;&gt;&gt;回到顶部&lt;/a&gt;&lt;/h5&gt; &lt;div class="mr-phone mate8"&gt; &lt;div class="mr-pic"&gt;&lt;img src="images/mate81.jpg" alt=""&gt;&lt;/div&gt; &lt;div class="mr-pic"&gt;&lt;img src="images/mate82.jpg" alt=""&gt;&lt;/div&gt; &lt;div class="mr-pic"&gt;&lt;img src="images/mate89.jpg" alt=""&gt;&lt;/div&gt; &lt;div class="mr-pic"&gt;&lt;img src="images/mate84.jpg" alt=""&gt;&lt;/div&gt; &lt;div class="mr-pic"&gt;&lt;img src="images/mate85.jpg" alt=""&gt;&lt;/div&gt; &lt;div class="mr-pic"&gt;&lt;img src="images/mate86.jpg" alt=""&gt;&lt;/div&gt; &lt;div class="mr-pic"&gt;&lt;img src="images/mate87.jpg" alt=""&gt;&lt;/div&gt; &lt;div class="mr-pic"&gt;&lt;img src="images/mate88.jpg" alt=""&gt;&lt;/div&gt; &lt;/div&gt; &lt;h5&gt;&amp;nbsp;位置:&lt;a name="huaweip8"&gt;华为p8&lt;/a&gt;&lt;a href="#top"&gt;&gt;&gt;回到顶部&lt;/a&gt;&lt;/h5&gt; &lt;div class="mr-phone p8"&gt; &lt;div class="mr-pic"&gt;&lt;img src="images/z1.jpg" alt=""&gt;&lt;/div&gt; &lt;div class="mr-pic"&gt;&lt;img src="images/p92.jpg" alt=""&gt;&lt;/div&gt; &lt;div class="mr-pic"&gt;&lt;img src="images/p93.jpg" alt=""&gt;&lt;/div&gt; &lt;div class="mr-pic"&gt;&lt;img src="images/p94.jpg" alt=""&gt;&lt;/div&gt; &lt;div class="mr-pic"&gt;&lt;img src="images/p95.jpg" alt=""&gt;&lt;/div&gt; &lt;div class="mr-pic"&gt;&lt;img src="images/p96.jpg" alt=""&gt;&lt;/div&gt; &lt;div class="mr-pic"&gt;&lt;img src="images/p97.jpg" alt=""&gt;&lt;/div&gt; &lt;div class="mr-pic"&gt;&lt;img src="images/p98.jpg" alt=""&gt;&lt;/div&gt; &lt;/div&gt; &lt;h5&gt;&amp;nbsp;位置:&lt;a name="huawei5c"&gt;华为5a&lt;/a&gt;&lt;a href="#top"&gt;&gt;&gt;回到顶部&lt;/a&gt;&lt;/h5&gt; &lt;div class="mr-phone huawei"&gt; &lt;div class="mr-pic"&gt;&lt;img src="images/z7.jpg" alt=""&gt;&lt;/div&gt; &lt;div class="mr-pic"&gt;&lt;img src="images/5a2.jpg" alt=""&gt;&lt;/div&gt; &lt;div class="mr-pic"&gt;&lt;img src="images/5a3.jpg" alt=""&gt;&lt;/div&gt; &lt;div class="mr-pic"&gt;&lt;img src="images/5a4.jpg" alt=""&gt;&lt;/div&gt; &lt;div class="mr-pic"&gt;&lt;img src="images/5a5.jpg" alt=""&gt;&lt;/div&gt; &lt;div class="mr-pic"&gt;&lt;img src="images/p98.jpg" alt=""&gt;&lt;/div&gt; &lt;div class="mr-pic"&gt;&lt;img src="images/p99.jpg" alt=""&gt;&lt;/div&gt; &lt;div class="mr-pic"&gt;&lt;img src="images/5c3.jpg" alt=""&gt;&lt;/div&gt; &lt;/div&gt; &lt;h5&gt;&amp;nbsp;位置:&lt;a name="huaweig9"&gt;华为g9&lt;/a&gt;&lt;a href="#top"&gt;&gt;&gt;回到顶部&lt;/a&gt;&lt;/h5&gt; &lt;div class="mr-phone g9"&gt; &lt;div class="mr-pic"&gt;&lt;img src="images/z1.jpg" alt=""&gt;&lt;/div&gt; &lt;div class="mr-pic"&gt;&lt;img src="images/ry1.jpg" alt=""&gt;&lt;/div&gt; &lt;div class="mr-pic"&gt;&lt;img src="images/z3.jpg" alt=""&gt;&lt;/div&gt; &lt;div class="mr-pic"&gt;&lt;img src="images/z4.jpg" alt=""&gt;&lt;/div&gt; &lt;div class="mr-pic"&gt;&lt;img src="images/z5.jpg" alt=""&gt;&lt;/div&gt; &lt;div class="mr-pic"&gt;&lt;img src="images/z6.jpg" alt=""&gt;&lt;/div&gt; &lt;div class="mr-pic"&gt;&lt;img src="images/z7.jpg" alt=""&gt;&lt;/div&gt; &lt;div class="mr-pic"&gt;&lt;img src="images/ry1.jpg" alt=""&gt;&lt;/div&gt; &lt;/div&gt; &lt;/div&gt;&lt;/div&gt; <div></div>

CSS

<div></div> *{ margin:0; padding:0}.mr-cont{ margin:20px 15%; height: 3440px; width: 1145px; background:rgba(192,192,192,0.4);}.mr-top{ padding:20px auto; height:500px; }.mr-nav{ width:1010px; height:30px; }.mr-nav ul{ margin-left:67px; height:37px; width:1030px; list-style:none; background:#C03; text-align:center; }.mr-nav ul li{ float:left; margin:7px auto; width:150px; font-size:20px; }.mr-nav ul li a{ color:#FFF; font-weight:900; }.mr-phone{ margin:5px 0; height:537px; }.rongyao{ background:rgba(0,255,255,0.3); }.mate8{ background:rgba(255,223,0,0.2); }.p8{ background:rgba(255,144,0,0.2); }.huawei{ background:rgba(255,0,96,0.2); }.g9{ background:rgba(144,0,255,0.2); }.mr-txt{ margin-left:50px; height:560px; width:1050px; }.mr-pic{ margin:20px 20px; float:left; border:1px solid #9c9c9c; }a{ text-decoration:none; }.mr-banner{ margin-left:67px; } <div></div>
  • mr-common.css
.mr-code-info{
text-align: left; margin:50px 20px; font-size:16px;}.mr-code-show{
margin-top:50px; margin-right:550px; margin-bottom:100px}h5{
text-align:left; margin:10px 0; font-size:12px;}.mr-code-link{
font-size: 16px; margin-left:50px}.mr-footer{
font-size:14px}body {
font-family: "futura-pt", sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;}.viewerWrapper {
font-family: "Source Code Pro", monospace; font-weight: 700; font-size: 16px; color: black; line-height: 22px;}.viewerWrapper .iconLabel {
font-family: "futura-pt", sans-serif; font-weight: 700; font-size: 22px; color: black; line-height: 30px; text-align: center;}.viewerWrapper .animateControl .iconLabel {
font-size: 16px; line-height: 30px;}.viewerWrapper .buttonCodepen {
font-family: "futura-pt", sans-serif; font-weight: 700; font-size: 16px; color: black; line-height: 38px; text-align: center;}.viewerWrapper h4 {
font-weight: 700; margin-bottom: 10px; margin-top: 25px; letter-spacing: 0.05em;}.viewerWrapper xmp {
font-weight: 400; white-space: pre-wrap; word-wrap: break-word; margin: 0;}.searchWrapper input.search {
color: black; font-family: "futura-pt", sans-serif; font-weight: 400; font-size: 16px; line-height: 24px;}body {
box-sizing: border-box; margin: 0;}.clear::after {
content: ""; display: block; clear: both;}button {
outline: none;}.container {
max-width: 1320px; margin: 0 auto; position: relative; height: 100vh; overflow: hidden;}.container .viewer {
display: none;}.container.viewerOpen .icons {
width: 63.25757576%;}.container.viewerOpen .icons .iconWrapper.selected {
border-color: #3CD5FF;}.container.viewerOpen .icons .iconWrapper.selected .icon {
color: #3CD5FF;}.container.viewerOpen .icons .icon.selected {
color: #3CD5FF;}.container.viewerOpen .viewer {
display: block;}.container.viewerOpen.letterIconViewerOpen .viewerWrapper .iconViewer .icon {
margin: 0 auto; position: relative;}.container.viewerOpen.letterIconViewerOpen .viewerWrapper .iconWrapper {
border: none; padding: 0; margin-top: 9px; width: auto; height: auto;}.container.viewerOpen.letterIconViewerOpen .viewerWrapper .iconWrapperBig {
height: 90px; width: auto; text-align: center;}.container.viewerOpen.letterIconViewerOpen .viewerWrapper .iconWrapperBig .scale {
-webkit-transform: scale(3); transform: scale(3); -webkit-transform-origin: center top; transform-origin: center top;}.containerHome .animateLogo {
cursor: pointer;}.containerHome .animateLogo .icon {
color: #ccc !important;}.containerHome .animateLogo:hover .icon {
color: #ff50a6 !important;}.containerAnimate .animateLogo .icon {
color: #ff50a6 !important;}.containerAnimate .logo {
cursor: pointer;}.containerAnimate .logo > .icon {
color: #ccc !important;}.containerAnimate .logo:hover > .icon {
color: #3CD5FF !important;}.containerHome .icons .iconWrapper:hover {
border-color: #3CD5FF;}.containerAnimate .icons .iconWrapper:hover {
border-color: #ffa3d0;}.iconsAnimateIconToAssignA.icons .iconWrapper:hover:before,.iconsAnimateIconToAssignB.icons .iconWrapper:hover:before {
content: ""; position: absolute; right: -2px; top: 6px; width: 3px; height: 12px; background-color: white;}.iconsAnimateIconToAssignA.icons .iconWrapper:hover .iconMarker,.iconsAnimateIconToAssignB.icons .iconWrapper:hover .iconMarker {
color: #ffa3d0;}.iconsAnimateIconToAssignA.icons .iconWrapper:hover .A.iconMarker {
display: block;}.iconsAnimateIconToAssignB.icons .iconWrapper:hover .B.iconMarker {
display: block;}.icons {
width: 100%; height: 100%; float: left; overflow: auto; -webkit-overflow-scrolling: touch; padding: 20px 15px 20px 20px; text-align: center; box-sizing: border-box; font-size:24px; position: relative;}.icons .iconWrapper {
display: inline-block; width: 75px; height: 75px; padding: 26px; box-sizing: border-box; border: solid 1px #ccc; border-radius: 0; margin-right: 5px; margin-bottom: 5px; background-color: #fff; cursor: pointer; -webkit-transition: border-color 0.4s ease-out; transition: border-color 0.4s ease-out;}.icons .iconWrapper:hover {
-webkit-transition: none; transition: none;}.icons .iconWrapper.iconWrapperHidden {
visibility: hidden; height: 0px; border: none; padding: 0;}.icons .iconWrapper .iconMarker {
display: none;}.icons .info {
max-width: 600px; text-align: center; font-size: 16px; font-weight: 700; margin: 40px auto 0 auto;}.icons .info a {
color: #000; text-decoration: underline;}.icons .about {
display: block; width: 100%; float: left; margin-top: 50px; margin-bottom: 50px;}.icons .about a {
font-size: 16px; font-weight: 700; color: #000; line-height: 16px; display: block; float: left; width: 20%; text-decoration: none; text-align: center;}.icons .about a i {
display: block; height: 25px; margin-bottom: 8px;}.icons .about a:hover {
text-decoration: underline;}.icons .about .youtube i {
background: url(../images/youtube.svg) no-repeat center bottom;}.icons .about .me i {
background: url(../images/w.svg) no-repeat center bottom;}.icons .about .github i {
background: url(../images/github.svg) no-repeat center bottom;}.icons .about .facebook i {
background: url(../images/facebook.svg) no-repeat center bottom;}.icons .about .twitter i {
background: url(../images/twitter.svg) no-repeat center bottom;}.viewer {
width: 36.74242424%; height: 100%; float: right; box-sizing: border-box; position: relative;}.viewer .buttonClose {
position: absolute; right: 10px; top: 41px; width: 21px; height: 21px; background-color: white; z-index: 9; cursor: pointer;}.viewer .buttonClose:before, .viewer .buttonClose:after {
content: ""; position: absolute; display: block; width: 29px; height: 1px; left: -4px; top: 10px; background-color: #000; -webkit-transform-origin: 50% 50%; transform-origin: 50% 50%;}.viewer .buttonClose:before {
-webkit-transform: rotate(45deg); transform: rotate(45deg);}.viewer .buttonClose:after {
-webkit-transform: rotate(-45deg); transform: rotate(-45deg);}.viewer .viewerWrapper {
box-sizing: border-box; border: solid 1px #ccc; border-radius: 0; position: absolute; top: 20px; bottom: 20px; left: 0; right: 20px; margin: 0; padding: 20px; overflow-y: auto; -webkit-overflow-scrolling: touch;}.viewer .viewerWrapper .iconWrapper {
position: absolute; width: 21px; height: 21px; padding: 8px; border: solid 1px #ccc;}.viewer .viewerWrapper .iconWrapperBig {
width: 84px; height: 84px; padding: 20px; margin: 40px auto 0 auto;}.viewer .viewerWrapper .iconWrapperBig .scale {
-webkit-transform: scale(4); transform: scale(4); -webkit-transform-origin: left top; transform-origin: left top; display: inline-block;}.viewer .viewerWrapper .iconLabel {
margin-bottom: 30px;}.viewer .viewerWrapper .buttonCodepen {
display: block; border: solid 1px #000; border-radius: 0; margin-bottom: 30px; cursor: pointer; padding: 0; background-color: transparent; width: 100%; letter-spacing: 0.03em;}.viewer .viewerWrapper .buttonCodepen svg {
margin-left: 3px; position: relative; top: 6px;}.viewer .viewerWrapper .buttonCodepen:hover {
background-color: #000; color: white;}.viewer .viewerWrapper .buttonCodepen:hover svg path {
fill: white;}.viewer .viewerWrapper h4 .buttonCopy {
float: right; cursor: pointer; min-width: 56px; height: 22px; position: relative;}.viewer .viewerWrapper h4 .buttonCopy .copy.icon {
position: absolute; top: 6px; right: 0;}.viewer .viewerWrapper h4 .buttonCopy.copied::after {
content: "copied";}.viewer .viewerWrapper h4 .buttonCopy::after {
content: "copy"; font-weight: 400; margin-right: 20px; display: none;}.viewer .viewerWrapper h4 .buttonCopy:hover::after {
display: block;}.viewer .viewerWrapper .animateControl {
margin-bottom: 30px;}.viewer .viewerWrapper .animateControl .iconLabel {
margin-bottom: 0;}.viewer .viewerWrapper .animateControl .iconLabel .iconALabel {
width: 50%; float: left; text-align: left;}.viewer .viewerWrapper .animateControl .iconLabel .iconBLabel {
width: 50%; float: right; text-align: right;}.viewer .viewerWrapper .animateControl .iconWrappers .iconWrapper {
position: relative; padding: 26px; border-color: #000;}.viewer .viewerWrapper .animateControl .iconWrappers .iconWrapper:before {
content: ""; position: absolute; right: -2px; top: 6px; width: 3px; height: 12px; background-color: white;}.viewer .viewerWrapper .animateControl .iconWrappers .iconWrapper .buttonLock {
cursor: pointer; position: absolute; left: -8px; bottom: 5px; width: 15px; height: 15px; background-color: #fff;}.viewer .viewerWrapper .animateControl .iconWrappers .iconWrapper .buttonLock:hover i {
color: #ff50a6;}.viewer .viewerWrapper .animateControl .iconWrappers .iconWrapper.locked {
border-color: #ccc;}.viewer .viewerWrapper .animateControl .iconWrappers .iconWrapper.locked .iconMarker {
color: #ccc;}.viewer .viewerWrapper .animateControl .iconWrappers .iconAWrapper {
float: left;}.viewer .viewerWrapper .animateControl .iconWrappers .iconBWrapper {
float: right;}.viewer .viewerWrapper .animateControl .iconWrappers .animateDirection {
text-align: center; top: 17px; margin-left: 75px; margin-right: 75px; position: relative;}.viewer .viewerWrapper .animateControl .iconWrappers .animateDirection:before {
content: ""; position: absolute; left: 0; top: 20px; width: 100%; height: 1px; background-color: #000;}.viewer .viewerWrapper .animateControl .iconWrappers .animateDirection.AtoB:after {
content: ""; position: absolute; right: 2px; top: 15px; width: 9px; height: 9px; border-left: solid 1px transparent; border-top: solid 1px transparent; border-right: solid 1px #000; border-bottom: solid 1px #000; -webkit-transform: rotate(-45deg); transform: rotate(-45deg); -webkit-transform-origin: center center; transform-origin: center center;}.viewer .viewerWrapper .animateControl .iconWrappers .animateDirection.BtoA:after {
content: ""; position: absolute; left: 2px; top: 15px; width: 9px; height: 9px; border-left: solid 1px #000; border-top: solid 1px #000; border-right: solid 1px transparent; border-bottom: solid 1px transparent; -webkit-transform: rotate(-45deg); transform: rotate(-45deg); -webkit-transform-origin: center center; transform-origin: center center;}.viewer .viewerWrapper .animateControl .iconWrappers .animateDirection .buttonPlay {
cursor: pointer; width: 39px; height: 39px; background-color: #fff; border: solid 1px #000; border-radius: 50%; display: inline-block; position: relative;}.viewer .viewerWrapper .animateControl .iconWrappers .animateDirection .buttonPlay:hover {
background-color: #000;}.viewer .viewerWrapper .animateControl .iconWrappers .animateDirection .buttonPlay:hover i {
color: #fff;}.iconWrapper {
position: relative;}.iconWrapper .A.iconMarker {
right: -3px; top: 13px;}.iconWrapper .B.iconMarker {
right: 2px; top: 6px;}.icons .iconWrapper.selectedAnimateIconA, .icons .iconWrapper.selectedAnimateIconB {
border-color: #ff50a6;}.icons .iconWrapper.selectedAnimateIconA:hover, .icons .iconWrapper.selectedAnimateIconB:hover {
border-color: #ff50a6;}.icons .iconWrapper.selectedAnimateIconA:hover .iconMarker, .icons .iconWrapper.selectedAnimateIconB:hover .iconMarker {
color: #ff50a6;}.icons .iconWrapper.selectedAnimateIconA:before, .icons .iconWrapper.selectedAnimateIconB:before {
content: ""; position: absolute; right: -2px; top: 6px; width: 3px; height: 12px; background-color: white;}.icons .iconWrapper.selectedAnimateIconA .icon, .icons .iconWrapper.selectedAnimateIconB .icon {
color: #ff50a6;}.icons .iconWrapper.selectedAnimateIconA .iconMarker, .icons .iconWrapper.selectedAnimateIconB .iconMarker {
color: #ff50a6;}.icons .iconWrapper.selectedAnimateIconA .A.iconMarker {
display: block;}.icons .iconWrapper.selectedAnimateIconA .B.iconMarker {
display: none;}.icons .iconWrapper.selectedAnimateIconA:hover .B.iconMarker {
display: none;}.icons .iconWrapper.selectedAnimateIconB .A.iconMarker {
display: none;}.icons .iconWrapper.selectedAnimateIconB .B.iconMarker {
display: block;}.icons .iconWrapper.selectedAnimateIconB:hover .A.iconMarker {
display: none;}.logo {
display: block; width: 100%; height: 30px; margin: 30px 0 50px 0; font-size: 20px;}.logo .icon {
cursor: pointer; display: inline-block;}.logo .icon.C {
position: relative; margin-right: -5px;}.logo .icon.S {
position: relative;}.logo .icon.I {
position: relative; margin-left: 18px;}.logo .icon.O {
position: relative;}.logo .icon.N {
position: relative;}.containerHome .logo .icon:hover {
color: #3CD5FF;}.animateLogo {
display: inline-block; margin-left: 18px; position: relative; bottom: 0; width: 119px; height: 21px; font-size: 16px;}.animateLogo .m-s.icon {
margin-right: -1px;}.animateLogo .t-s.icon {
margin-left: -1px;}.animateLogo .e-s.icon {
margin-left: -2px;}.animateLogo .icon {
position: relative; display: inline-block;}.searchWrapper {
width: 250px; position: absolute; right: 20px; top: 39px; box-sizing: border-box;}.searchWrapper input.search {
background: transparent; border: 0; width: 100%; border-bottom: solid 1px #000; padding: 9px 0 7px 0; outline: none; border-radius: 0; -webkit-appearance: none;}.searchWrapper ::-webkit-input-placeholder {
color: #000;}.searchWrapper :-moz-placeholder {
color: #000;}.searchWrapper ::-moz-placeholder {
color: #000;}.searchWrapper :-ms-input-placeholder {
color: #000;}.searchWrapper .search.icon {
display: none; position: absolute; top: 11px; right: 4px;}.searchWrapper button.close.icon {
display: none; background-color: transparent; display: inline-block; cursor: pointer; outline: 0; border: none; padding: 0; margin: 0; position: absolute; top: 10px; right: 0;}.searchWrapper input.search:not(:valid) ~ .close.icon {
display: none;}.searchWrapper input.search:not(:valid) ~ .search.icon {
display: block;}@media only screen and (min-width: 640px) and (max-width: 900px) {
.container.viewerOpen .logo {
margin-bottom: 20px; } .container.viewerOpen .searchWrapper {
width: auto; position: relative; right: inherit; top: inherit; margin-right: 5px; margin-bottom: 40px; } .container.viewerOpen .icons .about {
margin-top: 30px; } .container.viewerOpen .icons .about a {
width: 100%; margin-bottom: 20px; }}@media only screen and (min-width: 640px) and (max-width: 1024px) {
.container.viewerOpen .icons {
width: calc( 100% - 365px); } .container.viewerOpen .viewer {
width: 365px; }}@media only screen and (max-width: 639px) {
.icons {
width: 100%; } .icons .about {
margin-top: 30px; } .icons .about a {
width: 100%; margin-bottom: 20px; } .viewer {
width: auto; height: auto; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background-color: #fff; } .viewer .buttonClose {
right: 5px; top: 40px; width: 31px; height: 31px; } .viewer .buttonClose:before, .viewer .buttonClose:after {
width: 41px; left: -5px; top: 15px; } .viewer .viewerWrapper {
left: 20px; } .logo {
margin-bottom: 20px; } .searchWrapper {
width: auto; position: relative; right: inherit; top: inherit; margin-right: 5px; margin-bottom: 40px; }}.copy.icon {
width: 8px; height: 11px; border: solid 1px black; border-radius: 1px; position: relative;}.copy.icon:before {
content: ""; display: block; position: absolute; left: -3px; top: -3px; width: 8px; height: 11px; border-top: solid 1px black; border-left: solid 1px black; border-radius: 1px 0 0 0;}.search.icon {
width: 12px; height: 12px; border: solid 1px black; border-radius: 100%; -webkit-transform: rotate(-45deg); transform: rotate(-45deg); position: relative;}.search.icon:before {
content: ''; position: absolute; top: 12px; left: 5px; height: 6px; width: 1px; background-color: black;}.close.icon {
width: 21px; height: 21px;}.close.icon:before, .close.icon:after {
content: ""; display: block; width: 21px; height: 1px; background-color: black; position: absolute; top: 10px; -webkit-transform: rotate(45deg); transform: rotate(45deg);}.close.icon:before {
-webkit-transform: rotate(-45deg); transform: rotate(-45deg);}.buttonPlay i {
color: #000; position: absolute; left: 15px; top: 11px; width: 1px; height: 17px; background-color: currentColor;}.buttonPlay i:before {
content: ""; position: absolute; left: 1px; top: 0; width: 16px; height: 1px; background-color: currentColor; -webkit-transform-origin: left top; transform-origin: left top; -webkit-transform: rotate(30deg); transform: rotate(30deg);}.buttonPlay i:after {
content: ""; position: absolute; left: 1px; bottom: 0; width: 16px; height: 1px; background-color: currentColor; -webkit-transform-origin: left bottom; transform-origin: left bottom; -webkit-transform: rotate(-30deg); transform: rotate(-30deg);}.a-s.icon {
color: #000; width: 16px; height: 16px;}.a-s.icon:before {
content: ''; position: absolute; width: 10px; height: 10px; border-radius: 50%; border: solid 3px currentColor;}.a-s.icon:after {
content: ''; position: absolute; left: 13px; top: 0; width: 3px; height: 16px; background-color: currentColor;}.n-s.icon {
color: #000; width: 13px; height: 16px;}.n-s.icon:after {
content: ''; position: absolute; width: 7px; height: 13px; border-top: solid 3px currentColor; border-right: solid 3px currentColor; border-left: solid 3px currentColor; border-radius: 6px 6px 0 0;}.i-s.icon {
color: #000; width: 3px; height: 21px;}.i-s.icon:before {
content: ''; position: absolute; left: 0; width: 3px; height: 3px; background-color: currentColor;}.i-s.icon:after {
content: ''; position: absolute; left: 0; top: 5px; width: 3px; height: 16px; background-color: currentColor;}.m-s.icon {
color: #000; width: 21px; height: 16px;}.m-s.icon:before {
content: ''; position: absolute; width: 6px; height: 13px; border-top: solid 3px currentColor; border-right: solid 3px currentColor; border-left: solid 3px currentColor; border-radius: 6px 6px 0 0;}.m-s.icon:after {
content: ''; position: absolute; left: 9px; width: 6px; height: 13px; border-top: solid 3px currentColor; border-right: solid 3px currentColor; border-left: solid 3px currentColor; border-radius: 6px 6px 0 0;}.t-s.icon {
color: #000; width: 11px; height: 20px;}.t-s.icon:before {
content: ''; position: absolute; left: 3px; width: 4px; height: 17px; border-right: solid 3px transparent; border-left: solid 3px currentColor; border-bottom: solid 3px currentColor; border-radius: 0 0 6px 6px;}.t-s.icon:after {
content: ''; position: absolute; left: 0; top: 4px; width: 11px; height: 3px; background-color: currentColor;}.e-s.icon {
color: #000; width: 16px; height: 16px;}.e-s.icon:before {
content: ''; position: absolute; width: 10px; height: 3px; border-radius: 8px 8px 0 0; border: solid 3px currentColor;}.e-s.icon:after {
content: ''; position: absolute; width: 10px; height: 10px; border-radius: 50%; border-top: solid 3px transparent; border-right: solid 3px transparent; border-bottom: solid 3px currentColor; border-left: solid 3px currentColor; -webkit-transform: rotate(-18deg); transform: rotate(-18deg);}.A.iconMarker {
color: #000; position: absolute; width: 5px; height: 1px; background-color: currentColor;}.A.iconMarker:before {
content: ''; position: absolute; left: 2px; top: -7px; width: 1px; height: 12px; background-color: currentColor; -webkit-transform: skew(-19deg); transform: skew(-19deg); -webkit-transform-origin: right top; transform-origin: right top;}.A.iconMarker:after {
content: ''; position: absolute; left: 2px; top: -7px; width: 1px; height: 12px; background-color: currentColor; -webkit-transform: skew(19deg); transform: skew(19deg); -webkit-transform-origin: left top; transform-origin: left top;}.B.iconMarker {
color: #000; position: absolute; width: 1px; height: 11px; background-color: currentColor;}.B.iconMarker:before {
content: ''; position: absolute; left: 0; top: 0; width: 5px; height: 4px; border: solid 1px currentColor; border-radius: 0 50% 50% 0;}.B.iconMarker:after {
content: ''; position: absolute; top: 5px; width: 6px; height: 5px; border: solid 1px currentColor; border-radius: 0 50% 50% 0;}.locked.buttonLock i {
color: #000; position: absolute; top: 7px; width: 13px; height: 6px; border: solid 1px currentColor; border-radius: 1px;}.locked.buttonLock i:before {
content: ""; position: absolute; left: 3px; top: -8px; width: 5px; height: 6px; border-radius: 4px 4px 0 0; border-top: solid 1px currentColor; border-left: solid 1px currentColor; border-right: solid 1px currentColor;}.unlocked.buttonLock i {
color: #000; position: absolute; top: 7px; width: 13px; height: 6px; border: solid 1px currentColor; border-radius: 1px;}.unlocked.buttonLock i:before {
content: ""; position: absolute; left: 3px; top: -8px; width: 5px; height: 3px; border-radius: 4px 4px 0 0; border-top: solid 1px currentColor; border-left: solid 1px currentColor; border-right: solid 1px currentColor;}.unlocked.buttonLock i:after {
content: ""; position: absolute; left: 3px; top: -4px; width: 1px; height: 3px; background-color: currentColor;}.I.icon {
color: #000; position: absolute; height: 30px; width: 4px; background-color: currentColor;}.C.icon {
color: #000; position: absolute; width: 22px; height: 22px; border-radius: 50%; border-top: solid 4px currentColor; border-right: solid 4px transparent; border-bottom: solid 4px currentColor; border-left: solid 4px currentColor;}.S.icon:after {
content: ''; position: absolute; left: 0; bottom: 0; width: 10px; height: 10px; -webkit-transform: rotate(225deg); transform: rotate(225deg); border-radius: 50%; border-top: solid 4px currentColor; border-right: solid 4px transparent; border-bottom: solid 4px currentColor; border-left: solid 4px currentColor;}.S.icon:before {
content: ''; position: absolute; left: 1px; top: 0; width: 8px; height: 8px; -webkit-transform: rotate(45deg); transform: rotate(45deg); border-radius: 50%; border-top: solid 4px currentColor; border-right: solid 4px transparent; border-bottom: solid 4px currentColor; border-left: solid 4px currentColor;}.S.icon {
color: #000; position: absolute; width: 18px; height: 30px;}.O.icon {
color: #000; position: absolute; width: 22px; height: 22px; border-radius: 50%; border: solid 4px currentColor;}.N.icon:before {
content: ''; position: absolute; left: -4px; width: 4px; height: 30px; background-color: currentColor; -webkit-transform: skewX(32.5deg); transform: skewX(32.5deg); -webkit-transform-origin: left top; transform-origin: left top;}.N.icon {
color: #000; position: absolute; width: 15px; height: 30px; border-left: solid 4px currentColor; border-right: solid 4px currentColor;}@media screen and (min-height: 550px) {
.containerHome .codeBlocks {
position: absolute; top: 100px; left: 20px; right: 0; bottom: 0; padding-bottom: 20px; padding-right: 20px; overflow: auto; -webkit-overflow-scrolling: touch; } .containerHome .codeBlocks .codeBlockHover {
cursor: pointer; } .containerHome .codeBlocks .codeBlockHover:hover {
background-color: black; color: white; }}.containerAnimate .iconViewer .icon, .containerAnimate .iconViewer .icon:before, .containerAnimate .iconViewer .icon:after, .containerAnimate .iconViewer .icon i, .containerAnimate .iconViewer .icon i:before, .containerAnimate .iconViewer .icon i:after {
-webkit-transition: all 0.4s ease; transition: all 0.4s ease;}.containerHome .viewer.cssIconHover .iconViewer {
/* special cases */}.containerHome .viewer.cssIconHover .iconViewer .icon {
color: #3CD5FF !important;}.containerHome .viewer.cssIconHover .iconViewer .icon:before,.containerHome .viewer.cssIconHover .iconViewer .icon:after,.containerHome .viewer.cssIconHover .iconViewer .icon i,.containerHome .viewer.cssIconHover .iconViewer .icon i:before,.containerHome .viewer.cssIconHover .iconViewer .icon i:after,.containerHome .viewer.cssIconHover .iconViewer [class*="-solid"]:before,.containerHome .viewer.cssIconHover .iconViewer [class*="-solid"]:after {
color: black;}.containerHome .viewer.cssIconHover .iconViewer [class*="-solid"] i,.containerHome .viewer.cssIconHover .iconViewer [class*="-solid"] i:before,.containerHome .viewer.cssIconHover .iconViewer [class*="-solid"] i:after {
color: white;}.containerHome .viewer.cssIconHover .iconViewer .pin-solid.icon:before, .containerHome .viewer.cssIconHover .iconViewer .pin-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .stop-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .stop-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .clock-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .clock-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .clock-h3m30-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .clock-h3m30-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .clock-h9m0-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .clock-h9m0-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .clock-h9m30-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .clock-h9m30-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .mail-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .mail-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .card-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .card-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .keyboard-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .keyboard-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .mouse-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .mouse-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .browser-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .browser-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .mobile-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .mobile-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .target-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .target-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .picture-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .picture-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .float-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .float-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .unamused-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .unamused-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .pensive-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .pensive-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .smiley-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .smiley-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .relieved-smiley-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .relieved-smiley-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .sad-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .sad-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .smiley-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .smiley-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .grin-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .grin-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .laugh-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .laugh-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .relieved-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .relieved-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .tougue-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .tougue-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .smile-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .smile-solid.icon:after {
color: white;}.containerHome .viewer.cssIconHover .iconViewer .focus.icon:before, .containerHome .viewer.cssIconHover .iconViewer .focus.icon:after {
color: white;}.containerHome .viewer.cssIconHover .iconViewer .camera-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .eye-solid2.icon:before,.containerHome .viewer.cssIconHover .iconViewer .eye-solid3.icon:before,.containerHome .viewer.cssIconHover .iconViewer .sun-raindrop.icon:before,.containerHome .viewer.cssIconHover .iconViewer .sun-raindrop-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .moon-solid.icon:before {
color: white;}.containerHome .viewer.cssIconHover .iconViewer .tag-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .battery-solid-0.icon:after,.containerHome .viewer.cssIconHover .iconViewer .battery-solid-1.icon:after,.containerHome .viewer.cssIconHover .iconViewer .battery-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .battery-solid-3.icon:after,.containerHome .viewer.cssIconHover .iconViewer .suitcase-1.icon:after,.containerHome .viewer.cssIconHover .iconViewer .suitcase-3.icon:after,.containerHome .viewer.cssIconHover .iconViewer .watch-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .navigate.icon:after,.containerHome .viewer.cssIconHover .iconViewer .navigate i.icon:after,.containerHome .viewer.cssIconHover .iconViewer .navigate-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .tablet-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .snow.icon:after,.containerHome .viewer.cssIconHover .iconViewer .rain.icon:after,.containerHome .viewer.cssIconHover .iconViewer .cloud-raindrop.icon:after,.containerHome .viewer.cssIconHover .iconViewer .cloud-lightning.icon:after,.containerHome .viewer.cssIconHover .iconViewer .cloud-download.icon:after,.containerHome .viewer.cssIconHover .iconViewer .cloud-upload.icon:after {
color: white;}.containerHome .viewer.cssIconHover .iconViewer .mustache.icon i,.containerHome .viewer.cssIconHover .iconViewer .mustache.icon i:before,.containerHome .viewer.cssIconHover .iconViewer .mustache.icon i:after {
color: white;}.containerHome .viewer.cssIconHover .iconViewer .left-double-quote-solid i:before,.containerHome .viewer.cssIconHover .iconViewer .left-double-quote-solid i:after,.containerHome .viewer.cssIconHover .iconViewer .right-double-quote-solid i:before,.containerHome .viewer.cssIconHover .iconViewer .right-double-quote-solid i:after {
color: black;}.containerHome .viewer.cssIconBeforeHover .iconViewer .icon:before {
color: #3CD5FF !important;}.containerHome .viewer.cssIconAfterHover .iconViewer .icon:after {
color: #3CD5FF !important;}.containerHome .viewer.cssChildHover .iconViewer .icon i {
color: #3CD5FF !important;}.containerHome .viewer.cssChildHover .iconViewer .icon i:before,.containerHome .viewer.cssChildHover .iconViewer .icon i:after {
color: black;}.containerHome .viewer.cssChildHover .iconViewer [class*="-solid"] i:before,.containerHome .viewer.cssChildHover .iconViewer [class*="-solid"] i:after {
color: white;}.containerHome .viewer.cssChildHover .iconViewer .mustache.icon i:before,.containerHome .viewer.cssChildHover .iconViewer .mustache.icon i:after {
color: white;}.containerHome .viewer.cssChildBeforeHover .iconViewer .icon i:before {
color: #3CD5FF !important;}.containerHome .viewer.cssChildAfterHover .iconViewer .icon i:after {
color: #3CD5FF !important;}body {
color: currentColor;}.icon {
position: absolute;}.icon:before {
content: ''; position: absolute;}.icon:after {
content: ''; position: absolute;}.icon i {
position: absolute;}.icon i:before {
content: ''; position: absolute;}.icon i:after {
content: ''; position: absolute;}
  • mr-common.js
function closeCode(){
var codeArea=document.getElementById("codeArea"); codeArea.className="container containerHome";}function showCode(){
var codeArea=document.getElementById("codeArea"); codeArea.className="container containerHome viewerOpen";}

代码编辑完成后,在浏览器中打开文件,显示页面效果如图所示。当用户单击“华为荣耀”,“华为mate8”等文字时,页面会跳转到相应位置。

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-V74HHgJ1-1586080107044)(C:\Users\Jsck\Desktop\Web+Html+Css+JavaScript\第 1 篇:HTML 5 篇\3.图像和超链接\web8.png)]

图像的超链接

整幅图像的超链接

对于给整幅图像设置超链接来说,实现的方法比较简单,与文本链接的实现方法类似。其语法格式如下:

在该语法中,href参数用来设置图像的链接地址,而在图像属性中可以添加图像的其他参数,如height、border、 hspace 等。

下面列举一个实例。新建一个 HTML文件,首先应用< img> 标签添加5张手机图片,并为其设置图像的超链接,然后应用< img>标签添加5个购物车图标。

  • index.html
css常用选择器

手机

手机风暴

>

更多手机

OPPO

联想

魅族

乐视

荣耀

小米

OPPO R9 Plus

3499.00

vivo Xplay6

4498.00

Apple iPhone 7

5199.00

360 NS4

1249.00

小米 Note4

1099.00

  • css/mr-style.css
@charset "utf-8";#mr-content{
/*使用ID选择器设置页面布局*/ width:1200px; height:540px; border:1px solid red; margin:0 auto; text-align:left; font-size: 12px;/*设置文本对齐方式*/ }.mr-top{
/*使用类选择器设置页面布局*/ width:1200px; height:45px; border-bottom:2px solid; /*设置边框*/ margin:0 auto; /*设置外边距*/ }h2{
display:inline-block; color:#333333; }.mr-top .mr-p1{
display:inline-block; font-size:10px; color:#666; }.mr-top .mr-p2{
display:inline-block; font-size:10px; color:#666; float:right; padding:10px 20px 0 0; }.mr-img1{
/*使用类选择器设置图片浮动*/ float:left; }.mr-right{
/*使用类选择器设置页面布局*/ width:960px; /*设置宽度*/ height:527px; /*设置高度*/ float:left; /*设置浮动*/ position:relative; /*设置定位*/ }[att=a]{
/*使用属性选择器设置第1张手机图片位置及大小*/ width:180px; /*设置宽度*/ height:182px; /*设置高度*/ position:absolute; /*设置定位*/ left:140px; top:20px; }[att=b]{
/*使用属性选择器设置第2张手机图片位置及大小*/ width:180px; height:182px; position:absolute; left:700px; top:20px; }[att=c]{
/*使用属性选择器设置第3张手机图片位置及大小*/ width:180px; height:182px; position:absolute; left:400px; top:180px; }[att=d]{
/*使用属性选择器设置第4张手机图片位置及大小*/ width:180px; height:182px; position:absolute; left:100px; top:250px; }[att=e]{
/*使用属性选择器设置第5张手机图片位置及大小*/ width:180px; height:182px; position:absolute; left:650px; top:230px; }.mr-car1{
/*使用类选择器设置第1个购物车小图标位置*/ position:absolute; left:330px; top:170px; }.mr-car2{
/*使用类选择器设置第2个购物车小图标位置*/ position:absolute; left:890px; top:170px; }.mr-car3{
/*使用类选择器设置第3个购物车小图标位置*/ position:absolute; left:590px; top:330px; }.mr-car4{
/*使用类选择器设置第4个购物车小图标位置*/ position:absolute; left:290px; top:380px; }.mr-car5{
/*使用类选择器设置第5个购物车小图标位置*/ position:absolute; left:840px; top:380px; }.mr-price1{
/*使用类选择器设置第1个手机品牌文字的位置*/ position: absolute; left:50px; top:170px;}.mr-price2{
/*使用类选择器设置第2个手机品牌文字的位置*/ position: absolute; left:620px; top:170px;}.mr-price3{
/*使用类选择器设置第3个手机品牌文字的位置*/ position: absolute; left:0p; top:350px;} .mr-price4{
/*使用类选择器设置第4个手机品牌文字的位置*/ position: absolute; left:350px; top:300px;} .mr-price5{
/*使用类选择器设置第5个手机品牌文字的位置*/ position: absolute; left:560px; top:360px;} span{
/*使用元素选择器设置5个手机价格字体颜色以及大小*/ font-size: 10px; color: #706A6A;}

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-NmLVto5m-1586080107045)(C:\Users\Jsck\Desktop\Web+Html+Css+JavaScript\第 1 篇:HTML 5 篇\3.图像和超链接\web9.png)]

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-K43HWGC9-1586080107046)(C:\Users\Jsck\Desktop\Web+Html+Css+JavaScript\第 1 篇:HTML 5 篇\3.图像和超链接\web10.png)]

  • index-info.html
    
图片超链接

单击商品,进入商品详情页面

给图片添加超链接的方式与给文字添加超链接的方法相同,同样也可以连接到网页、图片等。添加超链接时,超链接的地址写正确即可。


效果
源码

手机

手机风暴

>

更多手机

OPPO

联想

魅族

乐视

荣耀

小米

OPPO R9 Plus

3499.00

vivo Xplay6

4498.00

Apple iPhone 7

5199.00

360 NS4

1249.00

小米 Note4

1099.00

源码

HTML

<div></div> &lt;div id="mr-content"&gt; &lt;div class="mr-top"&gt; &lt;h2&gt;手机&lt;/h2&gt; &lt;!--通过&lt;h2&gt;标签添加二级标题--&gt; &lt;p class="mr-p1"&gt;手机风暴&lt;/p&gt; &lt;!--通过&lt;p&gt;标签添加文字--&gt; &lt;p class="mr-p2"&gt;&gt;&lt;/p&gt; &lt;p class="mr-p2"&gt;更多手机&lt;/p&gt; &lt;p class="mr-p2"&gt;OPPO&lt;/p&gt; &lt;p class="mr-p2"&gt;联想&lt;/p&gt; &lt;p class="mr-p2"&gt;魅族&lt;/p&gt; &lt;p class="mr-p2"&gt;乐视&lt;/p&gt; &lt;p class="mr-p2"&gt;荣耀&lt;/p&gt; &lt;p class="mr-p2"&gt;小米&lt;/p&gt; &lt;/div&gt; &lt;a href="images/link.png" target="_blank"&gt;&lt;img src="images/8-1.jpg" alt="" class="mr-img1"&gt;&lt;/a&gt; &lt;!--通过&lt;img&gt;标签添加图片--&gt; &lt;div class="mr-right"&gt; &lt;a href="images/link.png" target="_blank"&gt;&lt;img src="images/8-1a.jpg" alt="" att="a"&gt;&lt;/a&gt; &lt;a href="images/link.png" target="_blank"&gt;&lt;img src="images/8-1b.jpg" alt="" att="b"&gt;&lt;/a&gt;&lt;br/&gt; &lt;a href="images/link.png" target="_blank"&gt;&lt;img src="images/8-1c.jpg" alt="" att="c"&gt;&lt;/a&gt; &lt;a href="images/link.png" target="_blank"&gt;&lt;img src="images/8-1d.jpg" alt="" att="d"&gt;&lt;/a&gt; &lt;a href="images/link.png" target="_blank"&gt;&lt;img src="images/8-1e.jpg" alt="" att="e"&gt;&lt;/a&gt; &lt;img src="images/8-1g.jpg" alt="" class="mr-car1"&gt; &lt;img src="images/8-1g.jpg" alt="" class="mr-car2"&gt; &lt;img src="images/8-1g.jpg" alt="" class="mr-car3"&gt; &lt;img src="images/8-1g.jpg" alt="" class="mr-car4"&gt; &lt;img src="images/8-1g.jpg" alt="" class="mr-car5"&gt; &lt;p class="mr-price1"&gt;OPPO R9 Plus&lt;br/&gt;&lt;span&gt;3499.00&lt;/span&gt;&lt;/p&gt; &lt;p class="mr-price2"&gt;vivo Xplay6&lt;br/&gt;&lt;span&gt;4498.00&lt;/span&gt;&lt;/p&gt; &lt;p class="mr-price3"&gt;Apple iPhone 7&lt;br/&gt;&lt;span&gt;5199.00&lt;/span&gt;&lt;/p&gt; &lt;p class="mr-price4"&gt;360 NS4&lt;br/&gt;&lt;span&gt;1249.00&lt;/span&gt;&lt;/p&gt; &lt;p class="mr-price5"&gt;小米 Note4&lt;br/&gt;&lt;span&gt;1099.00&lt;/span&gt;&lt;/p&gt; &lt;/div&gt;&lt;/div&gt; <div></div>

CSS

<div></div> #mr-content{ /*使用ID选择器设置页面布局*/ width:1200px; height:540px; border:1px solid red; margin:0 auto; text-align:left; /*设置文本对齐方式*/ }.mr-top{ /*使用类选择器设置页面布局*/ width:1200px; height:45px; border-bottom:2px solid; /*设置边框*/ margin:0 auto; /*设置外边距*/ }h2{ display:inline-block; color:#333333; }.mr-top .mr-p1{ display:inline-block; font-size:10px; color:#666; }.mr-top .mr-p2{ display:inline-block; font-size:10px; color:#666; float:right; padding:10px 20px 0 0; }.mr-img1{ /*使用类选择器设置图片浮动*/ float:left; }.mr-right{ /*使用类选择器设置页面布局*/ width:960px; /*设置宽度*/ height:527px; /*设置高度*/ float:left; /*设置浮动*/ position:relative; /*设置定位*/ }[att=a]{ /*使用属性选择器设置第1张手机图片位置及大小*/ width:180px; /*设置宽度*/ height:182px; /*设置高度*/ position:absolute; /*设置定位*/ left:140px; top:20px; }[att=b]{ /*使用属性选择器设置第2张手机图片位置及大小*/ width:180px; height:182px; position:absolute; left:700px; top:20px; }[att=c]{ /*使用属性选择器设置第3张手机图片位置及大小*/ width:180px; height:182px; position:absolute; left:400px; top:180px; }[att=d]{ /*使用属性选择器设置第4张手机图片位置及大小*/ width:180px; height:182px; position:absolute; left:100px; top:250px; }[att=e]{ /*使用属性选择器设置第5张手机图片位置及大小*/ width:180px; height:182px; position:absolute; left:650px; top:230px; }.mr-car1{ /*使用类选择器设置第1个购物车小图标位置*/ position:absolute; left:330px; top:170px; }.mr-car2{ /*使用类选择器设置第2个购物车小图标位置*/ position:absolute; left:890px; top:170px; }.mr-car3{ /*使用类选择器设置第3个购物车小图标位置*/ position:absolute; left:590px; top:330px; }.mr-car4{ /*使用类选择器设置第4个购物车小图标位置*/ position:absolute; left:290px; top:380px; }.mr-car5{ /*使用类选择器设置第5个购物车小图标位置*/ position:absolute; left:840px; top:380px; }.mr-price1{ position: absolute; left:50px; top:170px;}span{ font-size: 10px; color: #706A6A;}.mr-price2{ position: absolute; left:620px; top:170px;}.mr-price3{ position: absolute; left:0p; top:350px;} .mr-price4{ position: absolute; left:350px; top:300px;} .mr-price5{ position: absolute; left:560px; top:360px;} <div></div>
  • common/mr-common.css
.mr-code-info{
text-align: left; margin:50px 20px; font-size:16px;}.mr-code-show{
margin-top:50px; margin-bottom:600px}.mr-code-link{
font-size: 16px; margin-left:50px}.mr-footer{
font-size:14px}body {
font-family: "futura-pt", sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;}.viewerWrapper {
font-family: "Source Code Pro", monospace; font-weight: 700; font-size: 16px; color: black; line-height: 22px;}.viewerWrapper .iconLabel {
font-family: "futura-pt", sans-serif; font-weight: 700; font-size: 22px; color: black; line-height: 30px; text-align: center;}.viewerWrapper .animateControl .iconLabel {
font-size: 16px; line-height: 30px;}.viewerWrapper .buttonCodepen {
font-family: "futura-pt", sans-serif; font-weight: 700; font-size: 16px; color: black; line-height: 38px; text-align: center;}.viewerWrapper h4 {
font-weight: 700; margin-bottom: 10px; margin-top: 25px; letter-spacing: 0.05em;}.viewerWrapper xmp {
font-weight: 400; white-space: pre-wrap; word-wrap: break-word; margin: 0;}.searchWrapper input.search {
color: black; font-family: "futura-pt", sans-serif; font-weight: 400; font-size: 16px; line-height: 24px;}body {
box-sizing: border-box; margin: 0;}.clear::after {
content: ""; display: block; clear: both;}button {
outline: none;}.container {
max-width: 1320px; margin: 0 auto; position: relative; height: 100vh; overflow: hidden;}.container .viewer {
display: none;}.container.viewerOpen .icons {
width: 63.25757576%;}.container.viewerOpen .icons .iconWrapper.selected {
border-color: #3CD5FF;}.container.viewerOpen .icons .iconWrapper.selected .icon {
color: #3CD5FF;}.container.viewerOpen .icons .icon.selected {
color: #3CD5FF;}.container.viewerOpen .viewer {
display: block;}.container.viewerOpen.letterIconViewerOpen .viewerWrapper .iconViewer .icon {
margin: 0 auto; position: relative;}.container.viewerOpen.letterIconViewerOpen .viewerWrapper .iconWrapper {
border: none; padding: 0; margin-top: 9px; width: auto; height: auto;}.container.viewerOpen.letterIconViewerOpen .viewerWrapper .iconWrapperBig {
height: 90px; width: auto; text-align: center;}.container.viewerOpen.letterIconViewerOpen .viewerWrapper .iconWrapperBig .scale {
-webkit-transform: scale(3); transform: scale(3); -webkit-transform-origin: center top; transform-origin: center top;}.containerHome .animateLogo {
cursor: pointer;}.containerHome .animateLogo .icon {
color: #ccc !important;}.containerHome .animateLogo:hover .icon {
color: #ff50a6 !important;}.containerAnimate .animateLogo .icon {
color: #ff50a6 !important;}.containerAnimate .logo {
cursor: pointer;}.containerAnimate .logo > .icon {
color: #ccc !important;}.containerAnimate .logo:hover > .icon {
color: #3CD5FF !important;}.containerHome .icons .iconWrapper:hover {
border-color: #3CD5FF;}.containerAnimate .icons .iconWrapper:hover {
border-color: #ffa3d0;}.iconsAnimateIconToAssignA.icons .iconWrapper:hover:before,.iconsAnimateIconToAssignB.icons .iconWrapper:hover:before {
content: ""; position: absolute; right: -2px; top: 6px; width: 3px; height: 12px; background-color: white;}.iconsAnimateIconToAssignA.icons .iconWrapper:hover .iconMarker,.iconsAnimateIconToAssignB.icons .iconWrapper:hover .iconMarker {
color: #ffa3d0;}.iconsAnimateIconToAssignA.icons .iconWrapper:hover .A.iconMarker {
display: block;}.iconsAnimateIconToAssignB.icons .iconWrapper:hover .B.iconMarker {
display: block;}.icons {
width: 100%; height: 100%; float: left; overflow: auto; -webkit-overflow-scrolling: touch; padding: 20px 15px 20px 20px; text-align: center; box-sizing: border-box; font-size:24px; position: relative;}.icons .iconWrapper {
display: inline-block; width: 75px; height: 75px; padding: 26px; box-sizing: border-box; border: solid 1px #ccc; border-radius: 0; margin-right: 5px; margin-bottom: 5px; background-color: #fff; cursor: pointer; -webkit-transition: border-color 0.4s ease-out; transition: border-color 0.4s ease-out;}.icons .iconWrapper:hover {
-webkit-transition: none; transition: none;}.icons .iconWrapper.iconWrapperHidden {
visibility: hidden; height: 0px; border: none; padding: 0;}.icons .iconWrapper .iconMarker {
display: none;}.icons .info {
max-width: 600px; text-align: center; font-size: 16px; font-weight: 700; margin: 40px auto 0 auto;}.icons .info a {
color: #000; text-decoration: underline;}.icons .about {
display: block; width: 100%; float: left; margin-top: 50px; margin-bottom: 50px;}.icons .about a {
font-size: 16px; font-weight: 700; color: #000; line-height: 16px; display: block; float: left; width: 20%; text-decoration: none; text-align: center;}.icons .about a i {
display: block; height: 25px; margin-bottom: 8px;}.icons .about a:hover {
text-decoration: underline;}.icons .about .youtube i {
background: url(../images/youtube.svg) no-repeat center bottom;}.icons .about .me i {
background: url(../images/w.svg) no-repeat center bottom;}.icons .about .github i {
background: url(../images/github.svg) no-repeat center bottom;}.icons .about .facebook i {
background: url(../images/facebook.svg) no-repeat center bottom;}.icons .about .twitter i {
background: url(../images/twitter.svg) no-repeat center bottom;}.viewer {
width: 36.74242424%; height: 100%; float: right; box-sizing: border-box; position: relative;}.viewer .buttonClose {
position: absolute; right: 10px; top: 41px; width: 21px; height: 21px; background-color: white; z-index: 9; cursor: pointer;}.viewer .buttonClose:before, .viewer .buttonClose:after {
content: ""; position: absolute; display: block; width: 29px; height: 1px; left: -4px; top: 10px; background-color: #000; -webkit-transform-origin: 50% 50%; transform-origin: 50% 50%;}.viewer .buttonClose:before {
-webkit-transform: rotate(45deg); transform: rotate(45deg);}.viewer .buttonClose:after {
-webkit-transform: rotate(-45deg); transform: rotate(-45deg);}.viewer .viewerWrapper {
box-sizing: border-box; border: solid 1px #ccc; border-radius: 0; position: absolute; top: 20px; bottom: 20px; left: 0; right: 20px; margin: 0; padding: 20px; overflow-y: auto; -webkit-overflow-scrolling: touch;}.viewer .viewerWrapper .iconWrapper {
position: absolute; width: 21px; height: 21px; padding: 8px; border: solid 1px #ccc;}.viewer .viewerWrapper .iconWrapperBig {
width: 84px; height: 84px; padding: 20px; margin: 40px auto 0 auto;}.viewer .viewerWrapper .iconWrapperBig .scale {
-webkit-transform: scale(4); transform: scale(4); -webkit-transform-origin: left top; transform-origin: left top; display: inline-block;}.viewer .viewerWrapper .iconLabel {
margin-bottom: 30px;}.viewer .viewerWrapper .buttonCodepen {
display: block; border: solid 1px #000; border-radius: 0; margin-bottom: 30px; cursor: pointer; padding: 0; background-color: transparent; width: 100%; letter-spacing: 0.03em;}.viewer .viewerWrapper .buttonCodepen svg {
margin-left: 3px; position: relative; top: 6px;}.viewer .viewerWrapper .buttonCodepen:hover {
background-color: #000; color: white;}.viewer .viewerWrapper .buttonCodepen:hover svg path {
fill: white;}.viewer .viewerWrapper h4 .buttonCopy {
float: right; cursor: pointer; min-width: 56px; height: 22px; position: relative;}.viewer .viewerWrapper h4 .buttonCopy .copy.icon {
position: absolute; top: 6px; right: 0;}.viewer .viewerWrapper h4 .buttonCopy.copied::after {
content: "copied";}.viewer .viewerWrapper h4 .buttonCopy::after {
content: "copy"; font-weight: 400; margin-right: 20px; display: none;}.viewer .viewerWrapper h4 .buttonCopy:hover::after {
display: block;}.viewer .viewerWrapper .animateControl {
margin-bottom: 30px;}.viewer .viewerWrapper .animateControl .iconLabel {
margin-bottom: 0;}.viewer .viewerWrapper .animateControl .iconLabel .iconALabel {
width: 50%; float: left; text-align: left;}.viewer .viewerWrapper .animateControl .iconLabel .iconBLabel {
width: 50%; float: right; text-align: right;}.viewer .viewerWrapper .animateControl .iconWrappers .iconWrapper {
position: relative; padding: 26px; border-color: #000;}.viewer .viewerWrapper .animateControl .iconWrappers .iconWrapper:before {
content: ""; position: absolute; right: -2px; top: 6px; width: 3px; height: 12px; background-color: white;}.viewer .viewerWrapper .animateControl .iconWrappers .iconWrapper .buttonLock {
cursor: pointer; position: absolute; left: -8px; bottom: 5px; width: 15px; height: 15px; background-color: #fff;}.viewer .viewerWrapper .animateControl .iconWrappers .iconWrapper .buttonLock:hover i {
color: #ff50a6;}.viewer .viewerWrapper .animateControl .iconWrappers .iconWrapper.locked {
border-color: #ccc;}.viewer .viewerWrapper .animateControl .iconWrappers .iconWrapper.locked .iconMarker {
color: #ccc;}.viewer .viewerWrapper .animateControl .iconWrappers .iconAWrapper {
float: left;}.viewer .viewerWrapper .animateControl .iconWrappers .iconBWrapper {
float: right;}.viewer .viewerWrapper .animateControl .iconWrappers .animateDirection {
text-align: center; top: 17px; margin-left: 75px; margin-right: 75px; position: relative;}.viewer .viewerWrapper .animateControl .iconWrappers .animateDirection:before {
content: ""; position: absolute; left: 0; top: 20px; width: 100%; height: 1px; background-color: #000;}.viewer .viewerWrapper .animateControl .iconWrappers .animateDirection.AtoB:after {
content: ""; position: absolute; right: 2px; top: 15px; width: 9px; height: 9px; border-left: solid 1px transparent; border-top: solid 1px transparent; border-right: solid 1px #000; border-bottom: solid 1px #000; -webkit-transform: rotate(-45deg); transform: rotate(-45deg); -webkit-transform-origin: center center; transform-origin: center center;}.viewer .viewerWrapper .animateControl .iconWrappers .animateDirection.BtoA:after {
content: ""; position: absolute; left: 2px; top: 15px; width: 9px; height: 9px; border-left: solid 1px #000; border-top: solid 1px #000; border-right: solid 1px transparent; border-bottom: solid 1px transparent; -webkit-transform: rotate(-45deg); transform: rotate(-45deg); -webkit-transform-origin: center center; transform-origin: center center;}.viewer .viewerWrapper .animateControl .iconWrappers .animateDirection .buttonPlay {
cursor: pointer; width: 39px; height: 39px; background-color: #fff; border: solid 1px #000; border-radius: 50%; display: inline-block; position: relative;}.viewer .viewerWrapper .animateControl .iconWrappers .animateDirection .buttonPlay:hover {
background-color: #000;}.viewer .viewerWrapper .animateControl .iconWrappers .animateDirection .buttonPlay:hover i {
color: #fff;}.iconWrapper {
position: relative;}.iconWrapper .A.iconMarker {
right: -3px; top: 13px;}.iconWrapper .B.iconMarker {
right: 2px; top: 6px;}.icons .iconWrapper.selectedAnimateIconA, .icons .iconWrapper.selectedAnimateIconB {
border-color: #ff50a6;}.icons .iconWrapper.selectedAnimateIconA:hover, .icons .iconWrapper.selectedAnimateIconB:hover {
border-color: #ff50a6;}.icons .iconWrapper.selectedAnimateIconA:hover .iconMarker, .icons .iconWrapper.selectedAnimateIconB:hover .iconMarker {
color: #ff50a6;}.icons .iconWrapper.selectedAnimateIconA:before, .icons .iconWrapper.selectedAnimateIconB:before {
content: ""; position: absolute; right: -2px; top: 6px; width: 3px; height: 12px; background-color: white;}.icons .iconWrapper.selectedAnimateIconA .icon, .icons .iconWrapper.selectedAnimateIconB .icon {
color: #ff50a6;}.icons .iconWrapper.selectedAnimateIconA .iconMarker, .icons .iconWrapper.selectedAnimateIconB .iconMarker {
color: #ff50a6;}.icons .iconWrapper.selectedAnimateIconA .A.iconMarker {
display: block;}.icons .iconWrapper.selectedAnimateIconA .B.iconMarker {
display: none;}.icons .iconWrapper.selectedAnimateIconA:hover .B.iconMarker {
display: none;}.icons .iconWrapper.selectedAnimateIconB .A.iconMarker {
display: none;}.icons .iconWrapper.selectedAnimateIconB .B.iconMarker {
display: block;}.icons .iconWrapper.selectedAnimateIconB:hover .A.iconMarker {
display: none;}.logo {
display: block; width: 100%; height: 30px; margin: 30px 0 50px 0; font-size: 20px;}.logo .icon {
cursor: pointer; display: inline-block;}.logo .icon.C {
position: relative; margin-right: -5px;}.logo .icon.S {
position: relative;}.logo .icon.I {
position: relative; margin-left: 18px;}.logo .icon.O {
position: relative;}.logo .icon.N {
position: relative;}.containerHome .logo .icon:hover {
color: #3CD5FF;}.animateLogo {
display: inline-block; margin-left: 18px; position: relative; bottom: 0; width: 119px; height: 21px; font-size: 16px;}.animateLogo .m-s.icon {
margin-right: -1px;}.animateLogo .t-s.icon {
margin-left: -1px;}.animateLogo .e-s.icon {
margin-left: -2px;}.animateLogo .icon {
position: relative; display: inline-block;}.searchWrapper {
width: 250px; position: absolute; right: 20px; top: 39px; box-sizing: border-box;}.searchWrapper input.search {
background: transparent; border: 0; width: 100%; border-bottom: solid 1px #000; padding: 9px 0 7px 0; outline: none; border-radius: 0; -webkit-appearance: none;}.searchWrapper ::-webkit-input-placeholder {
color: #000;}.searchWrapper :-moz-placeholder {
color: #000;}.searchWrapper ::-moz-placeholder {
color: #000;}.searchWrapper :-ms-input-placeholder {
color: #000;}.searchWrapper .search.icon {
display: none; position: absolute; top: 11px; right: 4px;}.searchWrapper button.close.icon {
display: none; background-color: transparent; display: inline-block; cursor: pointer; outline: 0; border: none; padding: 0; margin: 0; position: absolute; top: 10px; right: 0;}.searchWrapper input.search:not(:valid) ~ .close.icon {
display: none;}.searchWrapper input.search:not(:valid) ~ .search.icon {
display: block;}@media only screen and (min-width: 640px) and (max-width: 900px) {
.container.viewerOpen .logo {
margin-bottom: 20px; } .container.viewerOpen .searchWrapper {
width: auto; position: relative; right: inherit; top: inherit; margin-right: 5px; margin-bottom: 40px; } .container.viewerOpen .icons .about {
margin-top: 30px; } .container.viewerOpen .icons .about a {
width: 100%; margin-bottom: 20px; }}@media only screen and (min-width: 640px) and (max-width: 1024px) {
.container.viewerOpen .icons {
width: calc( 100% - 365px); } .container.viewerOpen .viewer {
width: 365px; }}@media only screen and (max-width: 639px) {
.icons {
width: 100%; } .icons .about {
margin-top: 30px; } .icons .about a {
width: 100%; margin-bottom: 20px; } .viewer {
width: auto; height: auto; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background-color: #fff; } .viewer .buttonClose {
right: 5px; top: 40px; width: 31px; height: 31px; } .viewer .buttonClose:before, .viewer .buttonClose:after {
width: 41px; left: -5px; top: 15px; } .viewer .viewerWrapper {
left: 20px; } .logo {
margin-bottom: 20px; } .searchWrapper {
width: auto; position: relative; right: inherit; top: inherit; margin-right: 5px; margin-bottom: 40px; }}.copy.icon {
width: 8px; height: 11px; border: solid 1px black; border-radius: 1px; position: relative;}.copy.icon:before {
content: ""; display: block; position: absolute; left: -3px; top: -3px; width: 8px; height: 11px; border-top: solid 1px black; border-left: solid 1px black; border-radius: 1px 0 0 0;}.search.icon {
width: 12px; height: 12px; border: solid 1px black; border-radius: 100%; -webkit-transform: rotate(-45deg); transform: rotate(-45deg); position: relative;}.search.icon:before {
content: ''; position: absolute; top: 12px; left: 5px; height: 6px; width: 1px; background-color: black;}.close.icon {
width: 21px; height: 21px;}.close.icon:before, .close.icon:after {
content: ""; display: block; width: 21px; height: 1px; background-color: black; position: absolute; top: 10px; -webkit-transform: rotate(45deg); transform: rotate(45deg);}.close.icon:before {
-webkit-transform: rotate(-45deg); transform: rotate(-45deg);}.buttonPlay i {
color: #000; position: absolute; left: 15px; top: 11px; width: 1px; height: 17px; background-color: currentColor;}.buttonPlay i:before {
content: ""; position: absolute; left: 1px; top: 0; width: 16px; height: 1px; background-color: currentColor; -webkit-transform-origin: left top; transform-origin: left top; -webkit-transform: rotate(30deg); transform: rotate(30deg);}.buttonPlay i:after {
content: ""; position: absolute; left: 1px; bottom: 0; width: 16px; height: 1px; background-color: currentColor; -webkit-transform-origin: left bottom; transform-origin: left bottom; -webkit-transform: rotate(-30deg); transform: rotate(-30deg);}.a-s.icon {
color: #000; width: 16px; height: 16px;}.a-s.icon:before {
content: ''; position: absolute; width: 10px; height: 10px; border-radius: 50%; border: solid 3px currentColor;}.a-s.icon:after {
content: ''; position: absolute; left: 13px; top: 0; width: 3px; height: 16px; background-color: currentColor;}.n-s.icon {
color: #000; width: 13px; height: 16px;}.n-s.icon:after {
content: ''; position: absolute; width: 7px; height: 13px; border-top: solid 3px currentColor; border-right: solid 3px currentColor; border-left: solid 3px currentColor; border-radius: 6px 6px 0 0;}.i-s.icon {
color: #000; width: 3px; height: 21px;}.i-s.icon:before {
content: ''; position: absolute; left: 0; width: 3px; height: 3px; background-color: currentColor;}.i-s.icon:after {
content: ''; position: absolute; left: 0; top: 5px; width: 3px; height: 16px; background-color: currentColor;}.m-s.icon {
color: #000; width: 21px; height: 16px;}.m-s.icon:before {
content: ''; position: absolute; width: 6px; height: 13px; border-top: solid 3px currentColor; border-right: solid 3px currentColor; border-left: solid 3px currentColor; border-radius: 6px 6px 0 0;}.m-s.icon:after {
content: ''; position: absolute; left: 9px; width: 6px; height: 13px; border-top: solid 3px currentColor; border-right: solid 3px currentColor; border-left: solid 3px currentColor; border-radius: 6px 6px 0 0;}.t-s.icon {
color: #000; width: 11px; height: 20px;}.t-s.icon:before {
content: ''; position: absolute; left: 3px; width: 4px; height: 17px; border-right: solid 3px transparent; border-left: solid 3px currentColor; border-bottom: solid 3px currentColor; border-radius: 0 0 6px 6px;}.t-s.icon:after {
content: ''; position: absolute; left: 0; top: 4px; width: 11px; height: 3px; background-color: currentColor;}.e-s.icon {
color: #000; width: 16px; height: 16px;}.e-s.icon:before {
content: ''; position: absolute; width: 10px; height: 3px; border-radius: 8px 8px 0 0; border: solid 3px currentColor;}.e-s.icon:after {
content: ''; position: absolute; width: 10px; height: 10px; border-radius: 50%; border-top: solid 3px transparent; border-right: solid 3px transparent; border-bottom: solid 3px currentColor; border-left: solid 3px currentColor; -webkit-transform: rotate(-18deg); transform: rotate(-18deg);}.A.iconMarker {
color: #000; position: absolute; width: 5px; height: 1px; background-color: currentColor;}.A.iconMarker:before {
content: ''; position: absolute; left: 2px; top: -7px; width: 1px; height: 12px; background-color: currentColor; -webkit-transform: skew(-19deg); transform: skew(-19deg); -webkit-transform-origin: right top; transform-origin: right top;}.A.iconMarker:after {
content: ''; position: absolute; left: 2px; top: -7px; width: 1px; height: 12px; background-color: currentColor; -webkit-transform: skew(19deg); transform: skew(19deg); -webkit-transform-origin: left top; transform-origin: left top;}.B.iconMarker {
color: #000; position: absolute; width: 1px; height: 11px; background-color: currentColor;}.B.iconMarker:before {
content: ''; position: absolute; left: 0; top: 0; width: 5px; height: 4px; border: solid 1px currentColor; border-radius: 0 50% 50% 0;}.B.iconMarker:after {
content: ''; position: absolute; top: 5px; width: 6px; height: 5px; border: solid 1px currentColor; border-radius: 0 50% 50% 0;}.locked.buttonLock i {
color: #000; position: absolute; top: 7px; width: 13px; height: 6px; border: solid 1px currentColor; border-radius: 1px;}.locked.buttonLock i:before {
content: ""; position: absolute; left: 3px; top: -8px; width: 5px; height: 6px; border-radius: 4px 4px 0 0; border-top: solid 1px currentColor; border-left: solid 1px currentColor; border-right: solid 1px currentColor;}.unlocked.buttonLock i {
color: #000; position: absolute; top: 7px; width: 13px; height: 6px; border: solid 1px currentColor; border-radius: 1px;}.unlocked.buttonLock i:before {
content: ""; position: absolute; left: 3px; top: -8px; width: 5px; height: 3px; border-radius: 4px 4px 0 0; border-top: solid 1px currentColor; border-left: solid 1px currentColor; border-right: solid 1px currentColor;}.unlocked.buttonLock i:after {
content: ""; position: absolute; left: 3px; top: -4px; width: 1px; height: 3px; background-color: currentColor;}.I.icon {
color: #000; position: absolute; height: 30px; width: 4px; background-color: currentColor;}.C.icon {
color: #000; position: absolute; width: 22px; height: 22px; border-radius: 50%; border-top: solid 4px currentColor; border-right: solid 4px transparent; border-bottom: solid 4px currentColor; border-left: solid 4px currentColor;}.S.icon:after {
content: ''; position: absolute; left: 0; bottom: 0; width: 10px; height: 10px; -webkit-transform: rotate(225deg); transform: rotate(225deg); border-radius: 50%; border-top: solid 4px currentColor; border-right: solid 4px transparent; border-bottom: solid 4px currentColor; border-left: solid 4px currentColor;}.S.icon:before {
content: ''; position: absolute; left: 1px; top: 0; width: 8px; height: 8px; -webkit-transform: rotate(45deg); transform: rotate(45deg); border-radius: 50%; border-top: solid 4px currentColor; border-right: solid 4px transparent; border-bottom: solid 4px currentColor; border-left: solid 4px currentColor;}.S.icon {
color: #000; position: absolute; width: 18px; height: 30px;}.O.icon {
color: #000; position: absolute; width: 22px; height: 22px; border-radius: 50%; border: solid 4px currentColor;}.N.icon:before {
content: ''; position: absolute; left: -4px; width: 4px; height: 30px; background-color: currentColor; -webkit-transform: skewX(32.5deg); transform: skewX(32.5deg); -webkit-transform-origin: left top; transform-origin: left top;}.N.icon {
color: #000; position: absolute; width: 15px; height: 30px; border-left: solid 4px currentColor; border-right: solid 4px currentColor;}@media screen and (min-height: 550px) {
.containerHome .codeBlocks {
position: absolute; top: 100px; left: 20px; right: 0; bottom: 0; padding-bottom: 20px; padding-right: 20px; overflow: auto; -webkit-overflow-scrolling: touch; } .containerHome .codeBlocks .codeBlockHover {
cursor: pointer; } .containerHome .codeBlocks .codeBlockHover:hover {
background-color: black; color: white; }}.containerAnimate .iconViewer .icon, .containerAnimate .iconViewer .icon:before, .containerAnimate .iconViewer .icon:after, .containerAnimate .iconViewer .icon i, .containerAnimate .iconViewer .icon i:before, .containerAnimate .iconViewer .icon i:after {
-webkit-transition: all 0.4s ease; transition: all 0.4s ease;}.containerHome .viewer.cssIconHover .iconViewer {
/* special cases */}.containerHome .viewer.cssIconHover .iconViewer .icon {
color: #3CD5FF !important;}.containerHome .viewer.cssIconHover .iconViewer .icon:before,.containerHome .viewer.cssIconHover .iconViewer .icon:after,.containerHome .viewer.cssIconHover .iconViewer .icon i,.containerHome .viewer.cssIconHover .iconViewer .icon i:before,.containerHome .viewer.cssIconHover .iconViewer .icon i:after,.containerHome .viewer.cssIconHover .iconViewer [class*="-solid"]:before,.containerHome .viewer.cssIconHover .iconViewer [class*="-solid"]:after {
color: black;}.containerHome .viewer.cssIconHover .iconViewer [class*="-solid"] i,.containerHome .viewer.cssIconHover .iconViewer [class*="-solid"] i:before,.containerHome .viewer.cssIconHover .iconViewer [class*="-solid"] i:after {
color: white;}.containerHome .viewer.cssIconHover .iconViewer .pin-solid.icon:before, .containerHome .viewer.cssIconHover .iconViewer .pin-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .stop-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .stop-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .clock-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .clock-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .clock-h3m30-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .clock-h3m30-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .clock-h9m0-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .clock-h9m0-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .clock-h9m30-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .clock-h9m30-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .mail-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .mail-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .card-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .card-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .keyboard-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .keyboard-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .mouse-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .mouse-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .browser-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .browser-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .mobile-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .mobile-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .target-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .target-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .picture-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .picture-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .float-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .float-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .unamused-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .unamused-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .pensive-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .pensive-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .smiley-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .smiley-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .relieved-smiley-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .relieved-smiley-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .sad-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .sad-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .smiley-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .smiley-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .grin-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .grin-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .laugh-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .laugh-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .relieved-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .relieved-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .tougue-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .tougue-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .smile-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .smile-solid.icon:after {
color: white;}.containerHome .viewer.cssIconHover .iconViewer .focus.icon:before, .containerHome .viewer.cssIconHover .iconViewer .focus.icon:after {
color: white;}.containerHome .viewer.cssIconHover .iconViewer .camera-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .eye-solid2.icon:before,.containerHome .viewer.cssIconHover .iconViewer .eye-solid3.icon:before,.containerHome .viewer.cssIconHover .iconViewer .sun-raindrop.icon:before,.containerHome .viewer.cssIconHover .iconViewer .sun-raindrop-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .moon-solid.icon:before {
color: white;}.containerHome .viewer.cssIconHover .iconViewer .tag-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .battery-solid-0.icon:after,.containerHome .viewer.cssIconHover .iconViewer .battery-solid-1.icon:after,.containerHome .viewer.cssIconHover .iconViewer .battery-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .battery-solid-3.icon:after,.containerHome .viewer.cssIconHover .iconViewer .suitcase-1.icon:after,.containerHome .viewer.cssIconHover .iconViewer .suitcase-3.icon:after,.containerHome .viewer.cssIconHover .iconViewer .watch-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .navigate.icon:after,.containerHome .viewer.cssIconHover .iconViewer .navigate i.icon:after,.containerHome .viewer.cssIconHover .iconViewer .navigate-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .tablet-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .snow.icon:after,.containerHome .viewer.cssIconHover .iconViewer .rain.icon:after,.containerHome .viewer.cssIconHover .iconViewer .cloud-raindrop.icon:after,.containerHome .viewer.cssIconHover .iconViewer .cloud-lightning.icon:after,.containerHome .viewer.cssIconHover .iconViewer .cloud-download.icon:after,.containerHome .viewer.cssIconHover .iconViewer .cloud-upload.icon:after {
color: white;}.containerHome .viewer.cssIconHover .iconViewer .mustache.icon i,.containerHome .viewer.cssIconHover .iconViewer .mustache.icon i:before,.containerHome .viewer.cssIconHover .iconViewer .mustache.icon i:after {
color: white;}.containerHome .viewer.cssIconHover .iconViewer .left-double-quote-solid i:before,.containerHome .viewer.cssIconHover .iconViewer .left-double-quote-solid i:after,.containerHome .viewer.cssIconHover .iconViewer .right-double-quote-solid i:before,.containerHome .viewer.cssIconHover .iconViewer .right-double-quote-solid i:after {
color: black;}.containerHome .viewer.cssIconBeforeHover .iconViewer .icon:before {
color: #3CD5FF !important;}.containerHome .viewer.cssIconAfterHover .iconViewer .icon:after {
color: #3CD5FF !important;}.containerHome .viewer.cssChildHover .iconViewer .icon i {
color: #3CD5FF !important;}.containerHome .viewer.cssChildHover .iconViewer .icon i:before,.containerHome .viewer.cssChildHover .iconViewer .icon i:after {
color: black;}.containerHome .viewer.cssChildHover .iconViewer [class*="-solid"] i:before,.containerHome .viewer.cssChildHover .iconViewer [class*="-solid"] i:after {
color: white;}.containerHome .viewer.cssChildHover .iconViewer .mustache.icon i:before,.containerHome .viewer.cssChildHover .iconViewer .mustache.icon i:after {
color: white;}.containerHome .viewer.cssChildBeforeHover .iconViewer .icon i:before {
color: #3CD5FF !important;}.containerHome .viewer.cssChildAfterHover .iconViewer .icon i:after {
color: #3CD5FF !important;}body {
color: currentColor;}.icon {
position: absolute;}.icon:before {
content: ''; position: absolute;}.icon:after {
content: ''; position: absolute;}.icon i {
position: absolute;}.icon i:before {
content: ''; position: absolute;}.icon i:after {
content: ''; position: absolute;}
  • common/mr-common.js
function closeCode(){
var codeArea=document.getElementById("codeArea"); codeArea.className="container containerHome";}function showCode(){
var codeArea=document.getElementById("codeArea"); codeArea.className="container containerHome viewerOpen";}

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-FwTgAhdE-1586080107047)(C:\Users\Jsck\Desktop\Web+Html+Css+JavaScript\第 1 篇:HTML 5 篇\3.图像和超链接\web11.png)]

图像热区链接

除对整幅图像进行超链接的设置外,还可以将图像划分成不同的区域进行超链接设置。而包含热区的图像也可以称为映射图像。

在为图像设置热区链接时,大致需要经过以下两个步骤。

首先需要在图像文件中设置映射图像名。在添加图像的< img>标签中使用usemap属性添加图像要引用的映射图像的名称,语法格式如下:

然后需要定义热区图像及热区的链接,语法格式如下:

	

在该语法中,要先定义映射图像的名称,冉引用这个映射图像。在< area>标签中定义了热区的位置和链接,其中,shape 用来定义热区形状,可以取值为rect (矩形区域)、circle (圆形区域)及poly (多边形区域); coords 则用来设置区域坐标,对于不同的形状来说,coords 设置的方式也不同。

对于矩形区域来说,coords包含4个参数,分别为left、 top、 right和bottom, 也可以将这4个参数看作矩形两个对角的点坐标。

对于圆形区域来说,coords包含3个参数,分别为center-x、 center-y 和tadius, 也可以看作圆形的圆心坐标(x,y)与半径的值。

对于多边形区域来说,设置坐标参数比较复杂,跟多边形的形状息息相关。coords参数需要按照顺序(可以是逆时针,也可以是顺时针)取各个点的x y坐标值。由于定义坐标比较复杂而且难以控制,所以在一般情况下使用可视化软件进行这种参数的设置。

下面列举-一个实例。新建-一个HTML文件,使用< img> 标签添加图像,并且为图像添加热区链接。

  • index.html
设置图像热区链接
  • css/mr-style.css
@charset "utf-8";/* CSS Document */#mr-cont {
background: #fd7a72; text-align: center}

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-yBJMHHQq-1586080107047)(C:\Users\Jsck\Desktop\Web+Html+Css+JavaScript\第 1 篇:HTML 5 篇\3.图像和超链接\web12.png)]

  • index-info.html
    
设置图像热区链接

单击图片不同位置,图片跳转到不同页面

设置图像热区链接需要先定义映射图像的名称,然后再引用这个映射图像。在area标记中定义热区的位置和链接,其中shape用来定义热区形状,可以取值为rect(矩形区域)、circle(圆形区域)以及poly(多边形区域);coords参数则用来设置区域坐标,对于不同形状来说,coords设置的方式也不相同。coords参数需要按照顺序(可以是逆时针,也可以是顺时针)取各个点的x、y坐标值。由于定义坐标比较复杂而且难以控制,一般情况下都使用可视化软件进行这种参数的设置。


效果
源码
源码

HTML

<div></div> &lt;!-- 这里填写你的HTML代码--&gt;&lt;div id="mr-cont"&gt;&lt;img class="addr" src="img/big.png" usemap="mr-hotpoint" /&gt;&lt;map name="mr-hotpoint"&gt;&lt;!--left、top、right和bottom,--&gt;&lt;area shape="rect" coords="45,126,143,203" href="img/ad.jpg" title="电脑精装" target="_blank"/&gt;&lt;area shape="rect"coords="410,80,508,174" href="img/ad4.png"title="常用家电" target="_blank" /&gt;&lt;area shape="rect" coords="30,250,130,350" href="img/ad1.png" title="手机数码" target="_blank" /&gt;&lt;area shape="rect" coords="430,224,528,318" href="img/ad3.png" title="鲜货直达"target="_blank"/&gt;&lt;/map&gt;&lt;/div&gt; <div></div>

CSS

<div></div> &lt;!-- 这里填写你的CSS代码--&gt;#mr-cont { background: #fd7a72; text-align: center} <div></div>
  • common/mr-common.css
.mr-code-info{
text-align: left; margin:50px 20px; font-size:16px;}.mr-code-show{
margin-top:50px; margin-bottom:600px}.mr-code-link{
font-size: 16px; margin-left:50px}.mr-footer{
font-size:14px}body {
font-family: "futura-pt", sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;}.viewerWrapper {
font-family: "Source Code Pro", monospace; font-weight: 700; font-size: 16px; color: black; line-height: 22px;}.viewerWrapper .iconLabel {
font-family: "futura-pt", sans-serif; font-weight: 700; font-size: 22px; color: black; line-height: 30px; text-align: center;}.viewerWrapper .animateControl .iconLabel {
font-size: 16px; line-height: 30px;}.viewerWrapper .buttonCodepen {
font-family: "futura-pt", sans-serif; font-weight: 700; font-size: 16px; color: black; line-height: 38px; text-align: center;}.viewerWrapper h4 {
font-weight: 700; margin-bottom: 10px; margin-top: 25px; letter-spacing: 0.05em;}.viewerWrapper xmp {
font-weight: 400; white-space: pre-wrap; word-wrap: break-word; margin: 0;}.searchWrapper input.search {
color: black; font-family: "futura-pt", sans-serif; font-weight: 400; font-size: 16px; line-height: 24px;}body {
box-sizing: border-box; margin: 0;}.clear::after {
content: ""; display: block; clear: both;}button {
outline: none;}.container {
max-width: 1320px; margin: 0 auto; position: relative; height: 100vh; overflow: hidden;}.container .viewer {
display: none;}.container.viewerOpen .icons {
width: 63.25757576%;}.container.viewerOpen .icons .iconWrapper.selected {
border-color: #3CD5FF;}.container.viewerOpen .icons .iconWrapper.selected .icon {
color: #3CD5FF;}.container.viewerOpen .icons .icon.selected {
color: #3CD5FF;}.container.viewerOpen .viewer {
display: block;}.container.viewerOpen.letterIconViewerOpen .viewerWrapper .iconViewer .icon {
margin: 0 auto; position: relative;}.container.viewerOpen.letterIconViewerOpen .viewerWrapper .iconWrapper {
border: none; padding: 0; margin-top: 9px; width: auto; height: auto;}.container.viewerOpen.letterIconViewerOpen .viewerWrapper .iconWrapperBig {
height: 90px; width: auto; text-align: center;}.container.viewerOpen.letterIconViewerOpen .viewerWrapper .iconWrapperBig .scale {
-webkit-transform: scale(3); transform: scale(3); -webkit-transform-origin: center top; transform-origin: center top;}.containerHome .animateLogo {
cursor: pointer;}.containerHome .animateLogo .icon {
color: #ccc !important;}.containerHome .animateLogo:hover .icon {
color: #ff50a6 !important;}.containerAnimate .animateLogo .icon {
color: #ff50a6 !important;}.containerAnimate .logo {
cursor: pointer;}.containerAnimate .logo > .icon {
color: #ccc !important;}.containerAnimate .logo:hover > .icon {
color: #3CD5FF !important;}.containerHome .icons .iconWrapper:hover {
border-color: #3CD5FF;}.containerAnimate .icons .iconWrapper:hover {
border-color: #ffa3d0;}.iconsAnimateIconToAssignA.icons .iconWrapper:hover:before,.iconsAnimateIconToAssignB.icons .iconWrapper:hover:before {
content: ""; position: absolute; right: -2px; top: 6px; width: 3px; height: 12px; background-color: white;}.iconsAnimateIconToAssignA.icons .iconWrapper:hover .iconMarker,.iconsAnimateIconToAssignB.icons .iconWrapper:hover .iconMarker {
color: #ffa3d0;}.iconsAnimateIconToAssignA.icons .iconWrapper:hover .A.iconMarker {
display: block;}.iconsAnimateIconToAssignB.icons .iconWrapper:hover .B.iconMarker {
display: block;}.icons {
width: 100%; height: 100%; float: left; overflow: auto; -webkit-overflow-scrolling: touch; padding: 20px 15px 20px 20px; text-align: center; box-sizing: border-box; font-size:24px; position: relative;}.icons .iconWrapper {
display: inline-block; width: 75px; height: 75px; padding: 26px; box-sizing: border-box; border: solid 1px #ccc; border-radius: 0; margin-right: 5px; margin-bottom: 5px; background-color: #fff; cursor: pointer; -webkit-transition: border-color 0.4s ease-out; transition: border-color 0.4s ease-out;}.icons .iconWrapper:hover {
-webkit-transition: none; transition: none;}.icons .iconWrapper.iconWrapperHidden {
visibility: hidden; height: 0px; border: none; padding: 0;}.icons .iconWrapper .iconMarker {
display: none;}.icons .info {
max-width: 600px; text-align: center; font-size: 16px; font-weight: 700; margin: 40px auto 0 auto;}.icons .info a {
color: #000; text-decoration: underline;}.icons .about {
display: block; width: 100%; float: left; margin-top: 50px; margin-bottom: 50px;}.icons .about a {
font-size: 16px; font-weight: 700; color: #000; line-height: 16px; display: block; float: left; width: 20%; text-decoration: none; text-align: center;}.icons .about a i {
display: block; height: 25px; margin-bottom: 8px;}.icons .about a:hover {
text-decoration: underline;}.icons .about .youtube i {
background: url(../images/youtube.svg) no-repeat center bottom;}.icons .about .me i {
background: url(../images/w.svg) no-repeat center bottom;}.icons .about .github i {
background: url(../images/github.svg) no-repeat center bottom;}.icons .about .facebook i {
background: url(../images/facebook.svg) no-repeat center bottom;}.icons .about .twitter i {
background: url(../images/twitter.svg) no-repeat center bottom;}.viewer {
width: 36.74242424%; height: 100%; float: right; box-sizing: border-box; position: relative;}.viewer .buttonClose {
position: absolute; right: 10px; top: 41px; width: 21px; height: 21px; background-color: white; z-index: 9; cursor: pointer;}.viewer .buttonClose:before, .viewer .buttonClose:after {
content: ""; position: absolute; display: block; width: 29px; height: 1px; left: -4px; top: 10px; background-color: #000; -webkit-transform-origin: 50% 50%; transform-origin: 50% 50%;}.viewer .buttonClose:before {
-webkit-transform: rotate(45deg); transform: rotate(45deg);}.viewer .buttonClose:after {
-webkit-transform: rotate(-45deg); transform: rotate(-45deg);}.viewer .viewerWrapper {
box-sizing: border-box; border: solid 1px #ccc; border-radius: 0; position: absolute; top: 20px; bottom: 20px; left: 0; right: 20px; margin: 0; padding: 20px; overflow-y: auto; -webkit-overflow-scrolling: touch;}.viewer .viewerWrapper .iconWrapper {
position: absolute; width: 21px; height: 21px; padding: 8px; border: solid 1px #ccc;}.viewer .viewerWrapper .iconWrapperBig {
width: 84px; height: 84px; padding: 20px; margin: 40px auto 0 auto;}.viewer .viewerWrapper .iconWrapperBig .scale {
-webkit-transform: scale(4); transform: scale(4); -webkit-transform-origin: left top; transform-origin: left top; display: inline-block;}.viewer .viewerWrapper .iconLabel {
margin-bottom: 30px;}.viewer .viewerWrapper .buttonCodepen {
display: block; border: solid 1px #000; border-radius: 0; margin-bottom: 30px; cursor: pointer; padding: 0; background-color: transparent; width: 100%; letter-spacing: 0.03em;}.viewer .viewerWrapper .buttonCodepen svg {
margin-left: 3px; position: relative; top: 6px;}.viewer .viewerWrapper .buttonCodepen:hover {
background-color: #000; color: white;}.viewer .viewerWrapper .buttonCodepen:hover svg path {
fill: white;}.viewer .viewerWrapper h4 .buttonCopy {
float: right; cursor: pointer; min-width: 56px; height: 22px; position: relative;}.viewer .viewerWrapper h4 .buttonCopy .copy.icon {
position: absolute; top: 6px; right: 0;}.viewer .viewerWrapper h4 .buttonCopy.copied::after {
content: "copied";}.viewer .viewerWrapper h4 .buttonCopy::after {
content: "copy"; font-weight: 400; margin-right: 20px; display: none;}.viewer .viewerWrapper h4 .buttonCopy:hover::after {
display: block;}.viewer .viewerWrapper .animateControl {
margin-bottom: 30px;}.viewer .viewerWrapper .animateControl .iconLabel {
margin-bottom: 0;}.viewer .viewerWrapper .animateControl .iconLabel .iconALabel {
width: 50%; float: left; text-align: left;}.viewer .viewerWrapper .animateControl .iconLabel .iconBLabel {
width: 50%; float: right; text-align: right;}.viewer .viewerWrapper .animateControl .iconWrappers .iconWrapper {
position: relative; padding: 26px; border-color: #000;}.viewer .viewerWrapper .animateControl .iconWrappers .iconWrapper:before {
content: ""; position: absolute; right: -2px; top: 6px; width: 3px; height: 12px; background-color: white;}.viewer .viewerWrapper .animateControl .iconWrappers .iconWrapper .buttonLock {
cursor: pointer; position: absolute; left: -8px; bottom: 5px; width: 15px; height: 15px; background-color: #fff;}.viewer .viewerWrapper .animateControl .iconWrappers .iconWrapper .buttonLock:hover i {
color: #ff50a6;}.viewer .viewerWrapper .animateControl .iconWrappers .iconWrapper.locked {
border-color: #ccc;}.viewer .viewerWrapper .animateControl .iconWrappers .iconWrapper.locked .iconMarker {
color: #ccc;}.viewer .viewerWrapper .animateControl .iconWrappers .iconAWrapper {
float: left;}.viewer .viewerWrapper .animateControl .iconWrappers .iconBWrapper {
float: right;}.viewer .viewerWrapper .animateControl .iconWrappers .animateDirection {
text-align: center; top: 17px; margin-left: 75px; margin-right: 75px; position: relative;}.viewer .viewerWrapper .animateControl .iconWrappers .animateDirection:before {
content: ""; position: absolute; left: 0; top: 20px; width: 100%; height: 1px; background-color: #000;}.viewer .viewerWrapper .animateControl .iconWrappers .animateDirection.AtoB:after {
content: ""; position: absolute; right: 2px; top: 15px; width: 9px; height: 9px; border-left: solid 1px transparent; border-top: solid 1px transparent; border-right: solid 1px #000; border-bottom: solid 1px #000; -webkit-transform: rotate(-45deg); transform: rotate(-45deg); -webkit-transform-origin: center center; transform-origin: center center;}.viewer .viewerWrapper .animateControl .iconWrappers .animateDirection.BtoA:after {
content: ""; position: absolute; left: 2px; top: 15px; width: 9px; height: 9px; border-left: solid 1px #000; border-top: solid 1px #000; border-right: solid 1px transparent; border-bottom: solid 1px transparent; -webkit-transform: rotate(-45deg); transform: rotate(-45deg); -webkit-transform-origin: center center; transform-origin: center center;}.viewer .viewerWrapper .animateControl .iconWrappers .animateDirection .buttonPlay {
cursor: pointer; width: 39px; height: 39px; background-color: #fff; border: solid 1px #000; border-radius: 50%; display: inline-block; position: relative;}.viewer .viewerWrapper .animateControl .iconWrappers .animateDirection .buttonPlay:hover {
background-color: #000;}.viewer .viewerWrapper .animateControl .iconWrappers .animateDirection .buttonPlay:hover i {
color: #fff;}.iconWrapper {
position: relative;}.iconWrapper .A.iconMarker {
right: -3px; top: 13px;}.iconWrapper .B.iconMarker {
right: 2px; top: 6px;}.icons .iconWrapper.selectedAnimateIconA, .icons .iconWrapper.selectedAnimateIconB {
border-color: #ff50a6;}.icons .iconWrapper.selectedAnimateIconA:hover, .icons .iconWrapper.selectedAnimateIconB:hover {
border-color: #ff50a6;}.icons .iconWrapper.selectedAnimateIconA:hover .iconMarker, .icons .iconWrapper.selectedAnimateIconB:hover .iconMarker {
color: #ff50a6;}.icons .iconWrapper.selectedAnimateIconA:before, .icons .iconWrapper.selectedAnimateIconB:before {
content: ""; position: absolute; right: -2px; top: 6px; width: 3px; height: 12px; background-color: white;}.icons .iconWrapper.selectedAnimateIconA .icon, .icons .iconWrapper.selectedAnimateIconB .icon {
color: #ff50a6;}.icons .iconWrapper.selectedAnimateIconA .iconMarker, .icons .iconWrapper.selectedAnimateIconB .iconMarker {
color: #ff50a6;}.icons .iconWrapper.selectedAnimateIconA .A.iconMarker {
display: block;}.icons .iconWrapper.selectedAnimateIconA .B.iconMarker {
display: none;}.icons .iconWrapper.selectedAnimateIconA:hover .B.iconMarker {
display: none;}.icons .iconWrapper.selectedAnimateIconB .A.iconMarker {
display: none;}.icons .iconWrapper.selectedAnimateIconB .B.iconMarker {
display: block;}.icons .iconWrapper.selectedAnimateIconB:hover .A.iconMarker {
display: none;}.logo {
display: block; width: 100%; height: 30px; margin: 30px 0 50px 0; font-size: 20px;}.logo .icon {
cursor: pointer; display: inline-block;}.logo .icon.C {
position: relative; margin-right: -5px;}.logo .icon.S {
position: relative;}.logo .icon.I {
position: relative; margin-left: 18px;}.logo .icon.O {
position: relative;}.logo .icon.N {
position: relative;}.containerHome .logo .icon:hover {
color: #3CD5FF;}.animateLogo {
display: inline-block; margin-left: 18px; position: relative; bottom: 0; width: 119px; height: 21px; font-size: 16px;}.animateLogo .m-s.icon {
margin-right: -1px;}.animateLogo .t-s.icon {
margin-left: -1px;}.animateLogo .e-s.icon {
margin-left: -2px;}.animateLogo .icon {
position: relative; display: inline-block;}.searchWrapper {
width: 250px; position: absolute; right: 20px; top: 39px; box-sizing: border-box;}.searchWrapper input.search {
background: transparent; border: 0; width: 100%; border-bottom: solid 1px #000; padding: 9px 0 7px 0; outline: none; border-radius: 0; -webkit-appearance: none;}.searchWrapper ::-webkit-input-placeholder {
color: #000;}.searchWrapper :-moz-placeholder {
color: #000;}.searchWrapper ::-moz-placeholder {
color: #000;}.searchWrapper :-ms-input-placeholder {
color: #000;}.searchWrapper .search.icon {
display: none; position: absolute; top: 11px; right: 4px;}.searchWrapper button.close.icon {
display: none; background-color: transparent; display: inline-block; cursor: pointer; outline: 0; border: none; padding: 0; margin: 0; position: absolute; top: 10px; right: 0;}.searchWrapper input.search:not(:valid) ~ .close.icon {
display: none;}.searchWrapper input.search:not(:valid) ~ .search.icon {
display: block;}@media only screen and (min-width: 640px) and (max-width: 900px) {
.container.viewerOpen .logo {
margin-bottom: 20px; } .container.viewerOpen .searchWrapper {
width: auto; position: relative; right: inherit; top: inherit; margin-right: 5px; margin-bottom: 40px; } .container.viewerOpen .icons .about {
margin-top: 30px; } .container.viewerOpen .icons .about a {
width: 100%; margin-bottom: 20px; }}@media only screen and (min-width: 640px) and (max-width: 1024px) {
.container.viewerOpen .icons {
width: calc( 100% - 365px); } .container.viewerOpen .viewer {
width: 365px; }}@media only screen and (max-width: 639px) {
.icons {
width: 100%; } .icons .about {
margin-top: 30px; } .icons .about a {
width: 100%; margin-bottom: 20px; } .viewer {
width: auto; height: auto; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background-color: #fff; } .viewer .buttonClose {
right: 5px; top: 40px; width: 31px; height: 31px; } .viewer .buttonClose:before, .viewer .buttonClose:after {
width: 41px; left: -5px; top: 15px; } .viewer .viewerWrapper {
left: 20px; } .logo {
margin-bottom: 20px; } .searchWrapper {
width: auto; position: relative; right: inherit; top: inherit; margin-right: 5px; margin-bottom: 40px; }}.copy.icon {
width: 8px; height: 11px; border: solid 1px black; border-radius: 1px; position: relative;}.copy.icon:before {
content: ""; display: block; position: absolute; left: -3px; top: -3px; width: 8px; height: 11px; border-top: solid 1px black; border-left: solid 1px black; border-radius: 1px 0 0 0;}.search.icon {
width: 12px; height: 12px; border: solid 1px black; border-radius: 100%; -webkit-transform: rotate(-45deg); transform: rotate(-45deg); position: relative;}.search.icon:before {
content: ''; position: absolute; top: 12px; left: 5px; height: 6px; width: 1px; background-color: black;}.close.icon {
width: 21px; height: 21px;}.close.icon:before, .close.icon:after {
content: ""; display: block; width: 21px; height: 1px; background-color: black; position: absolute; top: 10px; -webkit-transform: rotate(45deg); transform: rotate(45deg);}.close.icon:before {
-webkit-transform: rotate(-45deg); transform: rotate(-45deg);}.buttonPlay i {
color: #000; position: absolute; left: 15px; top: 11px; width: 1px; height: 17px; background-color: currentColor;}.buttonPlay i:before {
content: ""; position: absolute; left: 1px; top: 0; width: 16px; height: 1px; background-color: currentColor; -webkit-transform-origin: left top; transform-origin: left top; -webkit-transform: rotate(30deg); transform: rotate(30deg);}.buttonPlay i:after {
content: ""; position: absolute; left: 1px; bottom: 0; width: 16px; height: 1px; background-color: currentColor; -webkit-transform-origin: left bottom; transform-origin: left bottom; -webkit-transform: rotate(-30deg); transform: rotate(-30deg);}.a-s.icon {
color: #000; width: 16px; height: 16px;}.a-s.icon:before {
content: ''; position: absolute; width: 10px; height: 10px; border-radius: 50%; border: solid 3px currentColor;}.a-s.icon:after {
content: ''; position: absolute; left: 13px; top: 0; width: 3px; height: 16px; background-color: currentColor;}.n-s.icon {
color: #000; width: 13px; height: 16px;}.n-s.icon:after {
content: ''; position: absolute; width: 7px; height: 13px; border-top: solid 3px currentColor; border-right: solid 3px currentColor; border-left: solid 3px currentColor; border-radius: 6px 6px 0 0;}.i-s.icon {
color: #000; width: 3px; height: 21px;}.i-s.icon:before {
content: ''; position: absolute; left: 0; width: 3px; height: 3px; background-color: currentColor;}.i-s.icon:after {
content: ''; position: absolute; left: 0; top: 5px; width: 3px; height: 16px; background-color: currentColor;}.m-s.icon {
color: #000; width: 21px; height: 16px;}.m-s.icon:before {
content: ''; position: absolute; width: 6px; height: 13px; border-top: solid 3px currentColor; border-right: solid 3px currentColor; border-left: solid 3px currentColor; border-radius: 6px 6px 0 0;}.m-s.icon:after {
content: ''; position: absolute; left: 9px; width: 6px; height: 13px; border-top: solid 3px currentColor; border-right: solid 3px currentColor; border-left: solid 3px currentColor; border-radius: 6px 6px 0 0;}.t-s.icon {
color: #000; width: 11px; height: 20px;}.t-s.icon:before {
content: ''; position: absolute; left: 3px; width: 4px; height: 17px; border-right: solid 3px transparent; border-left: solid 3px currentColor; border-bottom: solid 3px currentColor; border-radius: 0 0 6px 6px;}.t-s.icon:after {
content: ''; position: absolute; left: 0; top: 4px; width: 11px; height: 3px; background-color: currentColor;}.e-s.icon {
color: #000; width: 16px; height: 16px;}.e-s.icon:before {
content: ''; position: absolute; width: 10px; height: 3px; border-radius: 8px 8px 0 0; border: solid 3px currentColor;}.e-s.icon:after {
content: ''; position: absolute; width: 10px; height: 10px; border-radius: 50%; border-top: solid 3px transparent; border-right: solid 3px transparent; border-bottom: solid 3px currentColor; border-left: solid 3px currentColor; -webkit-transform: rotate(-18deg); transform: rotate(-18deg);}.A.iconMarker {
color: #000; position: absolute; width: 5px; height: 1px; background-color: currentColor;}.A.iconMarker:before {
content: ''; position: absolute; left: 2px; top: -7px; width: 1px; height: 12px; background-color: currentColor; -webkit-transform: skew(-19deg); transform: skew(-19deg); -webkit-transform-origin: right top; transform-origin: right top;}.A.iconMarker:after {
content: ''; position: absolute; left: 2px; top: -7px; width: 1px; height: 12px; background-color: currentColor; -webkit-transform: skew(19deg); transform: skew(19deg); -webkit-transform-origin: left top; transform-origin: left top;}.B.iconMarker {
color: #000; position: absolute; width: 1px; height: 11px; background-color: currentColor;}.B.iconMarker:before {
content: ''; position: absolute; left: 0; top: 0; width: 5px; height: 4px; border: solid 1px currentColor; border-radius: 0 50% 50% 0;}.B.iconMarker:after {
content: ''; position: absolute; top: 5px; width: 6px; height: 5px; border: solid 1px currentColor; border-radius: 0 50% 50% 0;}.locked.buttonLock i {
color: #000; position: absolute; top: 7px; width: 13px; height: 6px; border: solid 1px currentColor; border-radius: 1px;}.locked.buttonLock i:before {
content: ""; position: absolute; left: 3px; top: -8px; width: 5px; height: 6px; border-radius: 4px 4px 0 0; border-top: solid 1px currentColor; border-left: solid 1px currentColor; border-right: solid 1px currentColor;}.unlocked.buttonLock i {
color: #000; position: absolute; top: 7px; width: 13px; height: 6px; border: solid 1px currentColor; border-radius: 1px;}.unlocked.buttonLock i:before {
content: ""; position: absolute; left: 3px; top: -8px; width: 5px; height: 3px; border-radius: 4px 4px 0 0; border-top: solid 1px currentColor; border-left: solid 1px currentColor; border-right: solid 1px currentColor;}.unlocked.buttonLock i:after {
content: ""; position: absolute; left: 3px; top: -4px; width: 1px; height: 3px; background-color: currentColor;}.I.icon {
color: #000; position: absolute; height: 30px; width: 4px; background-color: currentColor;}.C.icon {
color: #000; position: absolute; width: 22px; height: 22px; border-radius: 50%; border-top: solid 4px currentColor; border-right: solid 4px transparent; border-bottom: solid 4px currentColor; border-left: solid 4px currentColor;}.S.icon:after {
content: ''; position: absolute; left: 0; bottom: 0; width: 10px; height: 10px; -webkit-transform: rotate(225deg); transform: rotate(225deg); border-radius: 50%; border-top: solid 4px currentColor; border-right: solid 4px transparent; border-bottom: solid 4px currentColor; border-left: solid 4px currentColor;}.S.icon:before {
content: ''; position: absolute; left: 1px; top: 0; width: 8px; height: 8px; -webkit-transform: rotate(45deg); transform: rotate(45deg); border-radius: 50%; border-top: solid 4px currentColor; border-right: solid 4px transparent; border-bottom: solid 4px currentColor; border-left: solid 4px currentColor;}.S.icon {
color: #000; position: absolute; width: 18px; height: 30px;}.O.icon {
color: #000; position: absolute; width: 22px; height: 22px; border-radius: 50%; border: solid 4px currentColor;}.N.icon:before {
content: ''; position: absolute; left: -4px; width: 4px; height: 30px; background-color: currentColor; -webkit-transform: skewX(32.5deg); transform: skewX(32.5deg); -webkit-transform-origin: left top; transform-origin: left top;}.N.icon {
color: #000; position: absolute; width: 15px; height: 30px; border-left: solid 4px currentColor; border-right: solid 4px currentColor;}@media screen and (min-height: 550px) {
.containerHome .codeBlocks {
position: absolute; top: 100px; left: 20px; right: 0; bottom: 0; padding-bottom: 20px; padding-right: 20px; overflow: auto; -webkit-overflow-scrolling: touch; } .containerHome .codeBlocks .codeBlockHover {
cursor: pointer; } .containerHome .codeBlocks .codeBlockHover:hover {
background-color: black; color: white; }}.containerAnimate .iconViewer .icon, .containerAnimate .iconViewer .icon:before, .containerAnimate .iconViewer .icon:after, .containerAnimate .iconViewer .icon i, .containerAnimate .iconViewer .icon i:before, .containerAnimate .iconViewer .icon i:after {
-webkit-transition: all 0.4s ease; transition: all 0.4s ease;}.containerHome .viewer.cssIconHover .iconViewer {
/* special cases */}.containerHome .viewer.cssIconHover .iconViewer .icon {
color: #3CD5FF !important;}.containerHome .viewer.cssIconHover .iconViewer .icon:before,.containerHome .viewer.cssIconHover .iconViewer .icon:after,.containerHome .viewer.cssIconHover .iconViewer .icon i,.containerHome .viewer.cssIconHover .iconViewer .icon i:before,.containerHome .viewer.cssIconHover .iconViewer .icon i:after,.containerHome .viewer.cssIconHover .iconViewer [class*="-solid"]:before,.containerHome .viewer.cssIconHover .iconViewer [class*="-solid"]:after {
color: black;}.containerHome .viewer.cssIconHover .iconViewer [class*="-solid"] i,.containerHome .viewer.cssIconHover .iconViewer [class*="-solid"] i:before,.containerHome .viewer.cssIconHover .iconViewer [class*="-solid"] i:after {
color: white;}.containerHome .viewer.cssIconHover .iconViewer .pin-solid.icon:before, .containerHome .viewer.cssIconHover .iconViewer .pin-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .stop-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .stop-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .clock-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .clock-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .clock-h3m30-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .clock-h3m30-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .clock-h9m0-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .clock-h9m0-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .clock-h9m30-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .clock-h9m30-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .mail-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .mail-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .card-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .card-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .keyboard-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .keyboard-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .mouse-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .mouse-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .browser-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .browser-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .mobile-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .mobile-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .target-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .target-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .picture-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .picture-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .float-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .float-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .unamused-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .unamused-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .pensive-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .pensive-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .smiley-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .smiley-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .relieved-smiley-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .relieved-smiley-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .sad-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .sad-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .smiley-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .smiley-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .grin-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .grin-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .laugh-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .laugh-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .relieved-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .relieved-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .tougue-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .tougue-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .smile-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .smile-solid.icon:after {
color: white;}.containerHome .viewer.cssIconHover .iconViewer .focus.icon:before, .containerHome .viewer.cssIconHover .iconViewer .focus.icon:after {
color: white;}.containerHome .viewer.cssIconHover .iconViewer .camera-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .eye-solid2.icon:before,.containerHome .viewer.cssIconHover .iconViewer .eye-solid3.icon:before,.containerHome .viewer.cssIconHover .iconViewer .sun-raindrop.icon:before,.containerHome .viewer.cssIconHover .iconViewer .sun-raindrop-solid.icon:before,.containerHome .viewer.cssIconHover .iconViewer .moon-solid.icon:before {
color: white;}.containerHome .viewer.cssIconHover .iconViewer .tag-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .battery-solid-0.icon:after,.containerHome .viewer.cssIconHover .iconViewer .battery-solid-1.icon:after,.containerHome .viewer.cssIconHover .iconViewer .battery-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .battery-solid-3.icon:after,.containerHome .viewer.cssIconHover .iconViewer .suitcase-1.icon:after,.containerHome .viewer.cssIconHover .iconViewer .suitcase-3.icon:after,.containerHome .viewer.cssIconHover .iconViewer .watch-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .navigate.icon:after,.containerHome .viewer.cssIconHover .iconViewer .navigate i.icon:after,.containerHome .viewer.cssIconHover .iconViewer .navigate-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .tablet-solid.icon:after,.containerHome .viewer.cssIconHover .iconViewer .snow.icon:after,.containerHome .viewer.cssIconHover .iconViewer .rain.icon:after,.containerHome .viewer.cssIconHover .iconViewer .cloud-raindrop.icon:after,.containerHome .viewer.cssIconHover .iconViewer .cloud-lightning.icon:after,.containerHome .viewer.cssIconHover .iconViewer .cloud-download.icon:after,.containerHome .viewer.cssIconHover .iconViewer .cloud-upload.icon:after {
color: white;}.containerHome .viewer.cssIconHover .iconViewer .mustache.icon i,.containerHome .viewer.cssIconHover .iconViewer .mustache.icon i:before,.containerHome .viewer.cssIconHover .iconViewer .mustache.icon i:after {
color: white;}.containerHome .viewer.cssIconHover .iconViewer .left-double-quote-solid i:before,.containerHome .viewer.cssIconHover .iconViewer .left-double-quote-solid i:after,.containerHome .viewer.cssIconHover .iconViewer .right-double-quote-solid i:before,.containerHome .viewer.cssIconHover .iconViewer .right-double-quote-solid i:after {
color: black;}.containerHome .viewer.cssIconBeforeHover .iconViewer .icon:before {
color: #3CD5FF !important;}.containerHome .viewer.cssIconAfterHover .iconViewer .icon:after {
color: #3CD5FF !important;}.containerHome .viewer.cssChildHover .iconViewer .icon i {
color: #3CD5FF !important;}.containerHome .viewer.cssChildHover .iconViewer .icon i:before,.containerHome .viewer.cssChildHover .iconViewer .icon i:after {
color: black;}.containerHome .viewer.cssChildHover .iconViewer [class*="-solid"] i:before,.containerHome .viewer.cssChildHover .iconViewer [class*="-solid"] i:after {
color: white;}.containerHome .viewer.cssChildHover .iconViewer .mustache.icon i:before,.containerHome .viewer.cssChildHover .iconViewer .mustache.icon i:after {
color: white;}.containerHome .viewer.cssChildBeforeHover .iconViewer .icon i:before {
color: #3CD5FF !important;}.containerHome .viewer.cssChildAfterHover .iconViewer .icon i:after {
color: #3CD5FF !important;}body {
color: currentColor;}.icon {
position: absolute;}.icon:before {
content: ''; position: absolute;}.icon:after {
content: ''; position: absolute;}.icon i {
position: absolute;}.icon i:before {
content: ''; position: absolute;}.icon i:after {
content: ''; position: absolute;}
  • common/mr-common.js
function closeCode(){
var codeArea=document.getElementById("codeArea"); codeArea.className="container containerHome";}function showCode(){
var codeArea=document.getElementById("codeArea"); codeArea.className="container containerHome viewerOpen";}
  • css/mr-style.css
@charset "utf-8";/* CSS Document */#mr-cont {
background: #fd7a72; text-align: center}

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-P28Gu3L1-1586080107048)(C:\Users\Jsck\Desktop\Web+Html+Css+JavaScript\第 1 篇:HTML 5 篇\3.图像和超链接\web13.png)]

转载地址:http://uhnwi.baihongyu.com/

你可能感兴趣的文章
大数据行业应用趋势
查看>>
Mac + Rails3 + MongoDB的Demo工程搭建
查看>>
隐藏于Python内的设计之禅彩蛋
查看>>
VSCode配置C/C++环境
查看>>
OTB测试之Visual Tracker Benchmark v1.0全过程配置流程
查看>>
缓存在Springboot应用中的使用
查看>>
Linux(一)- 认识Linux
查看>>
Linux(二)- Linux常用命令
查看>>
Linux(三)- Java开发环境搭建
查看>>
Linux(四)- Ubuntu安装Mysql
查看>>
Ubuntu安装开发环境
查看>>
Deepin开发环境安装
查看>>
Spring入门
查看>>
网址大全
查看>>
Git的使用
查看>>
Linux域名IP映射
查看>>
Java的反射机制
查看>>
SpringCloud微服务应用入门
查看>>
SpringCloud之session共享
查看>>
Springboot集成Shiro实现认证
查看>>