純 CSS 制作逼真的 iphone7
發(fā)布時(shí)間:2019-05-05 17:11:06 作者:佚名
我要評(píng)論

這篇文章主要介紹了純 CSS 畫(huà) iphone,本文通過(guò)實(shí)例代碼給大家介紹的非常詳細(xì),具有一定的參考借鑒價(jià)值 ,需要的朋友可以參考下
好幾天沒(méi)有更新了,直接上效果吧,哈哈?。ㄎ蚁脒@個(gè)應(yīng)該大部分都會(huì)!哈哈哈?。?/p>
代碼如下:
html:
<div class="container"> <div class="round"></div> <div class="longround"></div> <div class="screen">iphone 7plus</div> <div class="home"></div> </div>
css:
<style type="text/css"> .container { width: 300px; height: 600px; background-color: rgba(0, 0, 0, .6); margin: 50px auto; border-radius: 30px; box-shadow: 0 0 20px rgba(0, 0, 0, .5); position: relative; z-index: 999; } .container::before { content: ""; width: 3px; height: 50px; background: rgba(0, 0, 0, .5); position: absolute; top: 170px; left: 300px; border-radius: 0 4px 4px 0; } .container::after { content: ""; width: 3px; height: 100px; background: rgba(0, 0, 0, .5); position: absolute; top: 50px; left: 300px; border-radius: 0 4px 4px 0; } .container .round { width: 12px; height: 12px; border: 3px solid #4a4a4a; background-color: rgba(0, 0, 0, .6); border-radius: 50%; position: absolute; left: 50%; top: 10px; margin-left: -7.5px; } .container .longround { position: absolute; width: 100px; height: 8px; border: 3px solid #4a4a4a; background-color: rgba(0, 0, 0, .6); border-radius: 30px; position: absolute; left: 50%; margin-left: -50px; top: 35px; } .container .screen { width: 280px; height: 470px; background: linear-gradient(to bottom, rgba(255, 255, 255, .2), rgba(255, 255, 255, .8)); position: absolute; top: 60px; left: 50%; margin-left: -140px; color: #fff; text-align: center; font-weight: bold; font-size: 20px; line-height: 450px; box-shadow: 0 0 10px rgba(0, 0, 0, .6) inset; } .container .screen::before { content: ""; width: 50px; height: 4px; background: rgba(0, 0, 0, .5); border-radius: 3px 3px 0 0; position: absolute; top: -63px; left: 180px; } .container .screen::after { content: ""; width: 7px; height: 10px; background: rgba(0, 0, 0, .5); border-radius: 5px 0 0 5px; position: absolute; top: -10px; left: -17px; } .container .home { width: 50px; height: 50px; border-radius: 50%; background-color: rgba(0, 0, 0, .6); border: 2px solid #4a4a4a; position: absolute; bottom: 10px; left: 50%; margin-left: -25px; box-shadow: 0 0 2px black inset; } .container .home::before { content: ""; width: 25px; height: 25px; background-color: transparent; border: 2px solid rgba(255, 255, 255, .5); position: absolute; left: 10px; top: 10px; } </style>
總結(jié)
以上所述是小編給大家介紹的純 CSS 制作逼真的 iphone7,希望對(duì)大家有所幫助,如果大家有任何疑問(wèn)歡迎給我留言,小編會(huì)及時(shí)回復(fù)大家的!
相關(guān)文章
css3實(shí)現(xiàn)的iPhone X手機(jī)桌面背景圖片切換效果源碼
這是一款基于css3實(shí)現(xiàn)的iPhone X手機(jī)桌面背景圖片切換效果源碼。底部排列著各個(gè)圖片的縮略圖,上方是iPhone X手機(jī)界面,手機(jī)中可看到背景圖的清晰照片效果。點(diǎn)擊下方的縮略2017-11-30- 純CSS3仿iPhone文件夾特效源碼是一款純css3繪制蘋(píng)果手機(jī)iPhone界面樣式,點(diǎn)擊app文件夾可以打開(kāi)展示,和iPhone桌面的打開(kāi)效果很類(lèi)似。本段代碼可以在各個(gè)網(wǎng)頁(yè)使用,有需要2017-11-30
純CSS3模擬iPhone X屏幕背景切換動(dòng)畫(huà)特效
這是一個(gè)基于純CSS3的iPhone X背景切換動(dòng)畫(huà)特效,以淡入淡出為主,iPhone X屏幕的背景和頁(yè)面的背景交相呼應(yīng),逼真炫酷2017-11-16jQuery+CSS3實(shí)現(xiàn)iPhone手機(jī)鎖屏解鎖動(dòng)畫(huà)特效源碼
jQuery+CSS3實(shí)現(xiàn)iPhone手機(jī)鎖屏解鎖動(dòng)畫(huà)特效源碼是一款基于jQuery+CSS3實(shí)現(xiàn)的蘋(píng)果手機(jī)模型,控制鼠標(biāo)滑動(dòng)來(lái)實(shí)現(xiàn)手機(jī)解鎖進(jìn)入主界面。本段代碼可以在各個(gè)網(wǎng)頁(yè)使用2017-09-20CSS3 重置iphone瀏覽器按鈕input,select等表單元素的默認(rèn)樣式
之前寫(xiě)了一個(gè)登錄表單頁(yè)面,再iphone上測(cè)試遇到了一些奇怪的問(wèn)題:表單中的input[type="submit"]按鈕在iPhone的safari瀏覽器下會(huì)出現(xiàn)圓角的情況;input[type="text"]文本輸2014-10-11構(gòu)建iPhone企業(yè)級(jí)應(yīng)用-基于HTML,CSS和JavaScript pdf掃描版
筆者斯塔克會(huì)演示如何利用這些web技術(shù)設(shè)計(jì)和開(kāi)發(fā)iphone以及iphone touch平臺(tái)的應(yīng)用程序,而不必使用obiective-c或者cocoa2013-10-22CSS3模擬iPhone4界面 滑動(dòng)解鎖代碼下載
純CSS3模擬iPhone4界面及滑動(dòng)解鎖,沒(méi)有過(guò)多的使用圖片,能做出這種效果的確不錯(cuò)了2012-05-08jQuery+CSS仿iPhone手機(jī)天氣顯示的動(dòng)畫(huà)
CSS3+jQuery 模擬 ios 天氣顯示功能,仿iphone(蘋(píng)果)手機(jī)(或Android系統(tǒng)手機(jī))的天氣預(yù)報(bào)顯示效果,帶動(dòng)畫(huà)效果的天氣顯示功能,非常的漂亮2012-02-12