多小伙伴應該在初中的時候學過用英文寫信,地址都是要從小寫到大的,和中文地址完全反過來。
比如說,中國湖南省長沙市,英語的寫法中就會變成Changsha, Hunan province, China。
同樣的日期,我們以英式日期和中國日期做對比。在英式日期中,2017年03月21號在英語中會被寫成21st March 2017。又是反過來的。
不僅如此,我們本期要學的各種表示位置或方位的詞,它也是反過來的喲!讓我們來好好總結一下吧!
首先說說我們的東南西北英語怎么說:東East,南South,西West,北North。這4個單英語單詞大家應該很熟悉了。
但是東北用英語怎么說呢?西北呢?按照上面的原則都記得一定要把它反過來。
所以如果你要說東北,英語對應:northeast;西北:northwest;西南:southwest;東南:southeast.
來看幾個英語例句來鞏固一下它們的表達吧。
英語例句:
① Jilin lies to the northeast of Chengdu.
吉林在成都的東北方。
* lie to,to暗含的意思就是我們兩個不接壤。
② India lies on the southwest of China.
印度在中國的西南方。
* lie on,on暗含的意思就是我們兩個接壤,挨著一個邊兒。
同樣的,除了表示東南西北方位的詞是倒過來的以外,我們經常說到的“左上角,右上角”在英語中也是反過來的。
如果你把“左上角”翻譯成“left top corner”,那你就說反啦!
比如說“右上角”在英語中會“先說上,再說右”!英語表達:
左上角:the top left corner;
左下角:the bottom left corner;
右上角:the top right corner;
右下角:the bottom right corner。
好的,一個老套路我們說幾個英語例句總結一下吧。
① I saw a star in the top left corner of the picture.
在圖片的左上角我看到了一顆星星。
② Look at the bottom right corner of the screen, yes! That’s it!
看屏幕的右下角,太棒了!就是它!
本期的內容就說到這里,現在你能不能試著回憶一下,右下角的英語怎么說?
西南的英語又是怎么說呢?趕緊麻溜的,快速反應一下吧。
【資料大禮包】
1、關注卡片山谷英語頭條號,私信發送“Hi”給小編,即可獲得500G學習資料!
言:
圣誕節快到了,是不是要給女朋友或者正在追求的妹子一點小驚喜呢,今天這篇博客就分享下前端代碼如何實現3D立體動態相冊。趕緊學會了,來制作屬于我們程序員的浪漫吧!先上效果圖,來引起下你們的興趣。
正文:
一、新建一個index.html的文件,代碼如下
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>純CSS實現鼠標經過3D立體動態展示圖片特效代碼</title> <link type="text/css" href="css/style.css" rel="stylesheet" /> </head> <body> <div class="box"> <ul class="minbox"> <li></li> <li></li> <li></li> <li></li> <li></li> <li></li> </ul> <ol class="maxbox"> <li></li> <li></li> <li></li> <li></li> <li></li> <li></li> </ol> </div> </body> </html>
二、css樣式的代碼
@charset "utf-8"; *{ margin:0; padding:0; } body{ max-width: 100%; min-width: 100%; height: 100%; background-size: cover; background-repeat: no-repeat; background-attachment: fixed; background-size:100% 100%; position: absolute; margin-left: auto; margin-right: auto; } li{ list-style: none; } .box{ width:200px; height:200px; background-size: cover; background-repeat: no-repeat; background-attachment: fixed; background-size:100% 100%; position: absolute; margin-left: 42%; margin-top: 22%; -webkit-transform-style:preserve-3d; -webkit-transform:rotateX(13deg); -webkit-animation:move 5s linear infinite; } .minbox{ width:100px; height:100px; position: absolute; left:50px; top:30px; -webkit-transform-style:preserve-3d; } .minbox li{ width:100px; height:100px; position: absolute; left:0; top:0; } .minbox li:nth-child(1){ background: url(../img/01.png) no-repeat 0 0; -webkit-transform:translateZ(50px); } .minbox li:nth-child(2){ background: url(../img/02.png) no-repeat 0 0; -webkit-transform:rotateX(180deg) translateZ(50px); } .minbox li:nth-child(3){ background: url(../img/03.png) no-repeat 0 0; -webkit-transform:rotateX(-90deg) translateZ(50px); } .minbox li:nth-child(4){ background: url(../img/04.png) no-repeat 0 0; -webkit-transform:rotateX(90deg) translateZ(50px); } .minbox li:nth-child(5){ background: url(../img/05.png) no-repeat 0 0; -webkit-transform:rotateY(-90deg) translateZ(50px); } .minbox li:nth-child(6){ background: url(../img/06.png) no-repeat 0 0; -webkit-transform:rotateY(90deg) translateZ(50px); } .maxbox li:nth-child(1){ background: url(../img/1.png) no-repeat 0 0; -webkit-transform:translateZ(50px); } .maxbox li:nth-child(2){ background: url(../img/2.png) no-repeat 0 0; -webkit-transform:translateZ(50px); } .maxbox li:nth-child(3){ background: url(../img/3.png) no-repeat 0 0; -webkit-transform:rotateX(-90deg) translateZ(50px); } .maxbox li:nth-child(4){ background: url(../img/4.png) no-repeat 0 0; -webkit-transform:rotateX(90deg) translateZ(50px); } .maxbox li:nth-child(5){ background: url(../img/5.png) no-repeat 0 0; -webkit-transform:rotateY(-90deg) translateZ(50px); } .maxbox li:nth-child(6){ background: url(../img/6.png) no-repeat 0 0; -webkit-transform:rotateY(90deg) translateZ(50px); } .maxbox{ width: 800px; height: 400px; position: absolute; left: 0; top: -20px; -webkit-transform-style: preserve-3d; } .maxbox li{ width: 200px; height: 200px; background: #fff; border:1px solid #ccc; position: absolute; left: 0; top: 0; opacity: 0.2; -webkit-transition:all 1s ease; } .maxbox li:nth-child(1){ -webkit-transform:translateZ(100px); } .maxbox li:nth-child(2){ -webkit-transform:rotateX(180deg) translateZ(100px); } .maxbox li:nth-child(3){ -webkit-transform:rotateX(-90deg) translateZ(100px); } .maxbox li:nth-child(4){ -webkit-transform:rotateX(90deg) translateZ(100px); } .maxbox li:nth-child(5){ -webkit-transform:rotateY(-90deg) translateZ(100px); } .maxbox li:nth-child(6){ -webkit-transform:rotateY(90deg) translateZ(100px); } .box:hover ol li:nth-child(1){ -webkit-transform:translateZ(300px); width: 400px; height: 400px; opacity: 0.8; left: -100px; top: -100px; } .box:hover ol li:nth-child(2){ -webkit-transform:rotateX(180deg) translateZ(300px); width: 400px; height: 400px; opacity: 0.8; left: -100px; top: -100px; } .box:hover ol li:nth-child(3){ -webkit-transform:rotateX(-90deg) translateZ(300px); width: 400px; height: 400px; opacity: 0.8; left: -100px; top: -100px; } .box:hover ol li:nth-child(4){ -webkit-transform:rotateX(90deg) translateZ(300px); width: 400px; height: 400px; opacity: 0.8; left: -100px; top: -100px; } .box:hover ol li:nth-child(5){ -webkit-transform:rotateY(-90deg) translateZ(300px); width: 400px; height: 400px; opacity: 0.8; left: -100px; top: -100px; } .box:hover ol li:nth-child(6){ -webkit-transform:rotateY(90deg) translateZ(300px); width: 400px; height: 400px; opacity: 0.8; left: -100px; top: -100px; } @keyframes move{ 0%{ -webkit-transform: rotateX(13deg) rotateY(0deg); } 100%{ -webkit-transform:rotateX(13deg) rotateY(360deg); } }
三、文件的目錄結構,把css文件放到css文件夾里,圖片放到img文件夾里。
四、圖片尺寸不會修改的,可以選擇使用美圖秀秀網頁版很簡單
五、容易出現的問題 ,圖片展示不全或展示的方向不對
1.圖片尺寸需要修改 (解決展示不全的情況)
上圖是我的圖片文件夾里放的圖片 ,首先01-06編號命名的圖片尺寸是100x100px的大小的,1-6編號是400x400px,如果效果想展示最佳,100x100px的圖片是以頭部特寫的照片最好,因為01-06是立體照片內部小正方體的照片,1-6編號是外部正方體的照片。
2.圖片的方向需要修改(解決頭朝下的問題)
修改的方向如上圖展示所示,比如第三張頭就應該朝下,否則形成的效果圖像會出現頭是倒著的情況。
六、放一下動態效果圖
總結:
生活雖然總有辛酸,但是我們不應該減少去創造生活的樂趣,不斷尋找屬于自己的那份快樂,才應該是我們生活的態度。
我自己是一名從事了多年開發的web前端老程序員,目前辭職在做自己的web前端私人定制課程,今年年初我花了一個月整理了一份最適合2019年學習的web前端學習干貨,各種框架都有整理,送給每一位前端小伙伴,想要獲取的可以關注我的頭條號并在后臺私信我:前端,即可免費獲取。
原文鏈接:https://blog.csdn.net/jdk_wangtaida/article/details/103253883
次我們來說一下,HTML網頁中的定位,有很多小伙伴一定好奇,為什么我們寫的代碼都是按順序羅列的而在網頁的展示效果中,我們的各種樣式,標簽,圖片等東西都是出現在網頁的各個位置,網頁看起來很美觀,各種盒模型擺放合理,這是因為在HTML中有定位的能力,今天我們就來學習一下。
position在英語中是位置的意思,而在我們CSS代碼中position也是跟位置有關的,position有三個屬性值分別為relative(相對定位:相對于自己原來的位置進行定位,但保留自己原來的位置,別的元素無法占用),absolute(絕對定位:相對于有定位的父級進行定位,如果沒有則相對于文檔進行定位,定位會脫離文檔,不保留原來的位置,會和原來的文檔不在一個層),fixed(位置定位:他的位置不會隨著滑輪的滾動而改變較常見于彈窗廣告,他也會脫離文檔流)。
我們說完了position,接下來我們就說說他是怎么進行定位的,我們有left,top,right,bottom,五個屬性分別對應 距左邊,距上邊,距右邊,距下邊,大家注意到我在每個方向前都加了個距字,我們所做的定位是距各個方向的距離而不是移動,例:left:200px,是向右移動200像素,他的意思是距離左邊增加200像素。在我們實際的編程中一般都不常用bottom,我們知道,滑輪是可以一直往下滑的,所以我們相對于底部定位的話就很困難。
我們來通過代碼和結果來看一下:
沒有定位的樣式
加了relative
加了relative的結果
上面這個結果圖看著比例不太對是因為作者截圖沒截好[捂臉]
我們可以看出貓圖片并沒有移動,而是給兔子圖片留著位置。
加了absolute
加了absolute的結果
這個結果我們可以看出貓圖片向前移動了,并沒有保留兔子圖片原來的位置
加了fixed
代碼中的<br>是為了使滑輪可以滑動,以便更好的展示效果。
<script src="https://lf6-cdn-tos.bytescm.com/obj/cdn-static-resource/tt_player/tt.player.js?v=20160723"></script>
用了fixed的效果展示。
以上的代碼樣式只對兔子圖片起作用,我沒有給貓添加任何樣式,貓圖片只是作為參照物。
*請認真填寫需求信息,我們會在24小時內與您取得聯系。