首頁 web前端 css教學 九款純CSS3繪製的復古相機特效代碼

九款純CSS3繪製的復古相機特效代碼

Jul 24, 2020 pm 05:17 PM
css3 復古相機

這篇文章跟大家分享九款純CSS3繪製的復古相機特效代碼。有一定的參考價值,有需要的朋友可以參考一下,希望對大家有幫助。

先看看製作出來的效果圖:

九款純CSS3繪製的復古相機特效代碼

PS: 

有人會說,這些東西實用性不強,沒啥用。一開始我也是這麼覺得,但後來我就改變自己的看法。首先,實用性目前來說確實不強,或者說應用範圍很窄。但其實它可以提升自己的創意思維,css3的綜合運用以及html程式碼的最佳化。

當自己熟練使用的時候,會漸漸發現自己在重構那一塊更有想法和得心應手;其次,作為一個學生,在開發經驗上略顯不足,想分享一篇高質量的文章確實不易,所以我找準CSS3動畫這個點,分享自己製作的一些好玩的demo,給大家帶來一點點工作上或者生活上的樂趣,這就是我分享的初衷。

當然,我也希望自己以後開發經驗開始豐富的時候可以給大家分享更有價值的文章,這就等時間去沉澱吧!

OK,上面的效果是我依據一張自己在網路上找的設計稿使用css3還原的,接下來就一個一個分享出來:

首先需要一個容器:

<div></div>
登入後複製

以及一些必要的css樣式:

.container{
    width:600px;
    height:600px;
    margin:0 auto;
    overflow:hidden;
}
.style_1,.style_2,.style_3,.style_4,.style_5,.style_6,.style_7,.style_8,.style_9{
    width:200px;
    height:200px;
    float:left;
    position:relative;
}
.style_1,.style_5,.style_9{
    background-color:#f7b234;
}
.style_2,.style_6,.style_7{
    background-color:#60a4ac;
}
.style_3,.style_4,.style_8{
    background-color:#f47752;
}
登入後複製

第一款相機

九款純CSS3繪製的復古相機特效代碼

##html程式碼:

    
        
            <div></div>             
                <div></div>             
        
        
            <div></div>         
    
登入後複製
css程式碼:


.camera_style_1{
    width:120px;
    height:86px;
    margin:0 auto;
    position: absolute;
    top:50%;
    left:50%;
    margin-left:-60px;
    margin-top:-43px;
}
.camera_style_1 .header{
    width:100%;
    height:15px;
}
.camera_style_1 .main{
    width:100%;
    height:55px;
    background-color:#e17c10;
    border-top:8px solid #016675;
    border-bottom:8px solid #016675;
    border-radius:2px;
    border-top-right-radius:0;
}
.camera_style_1 .left{
    width:0;
    height:0;
    border:12px solid transparent;
    border-bottom:8px solid #cf7323;
    position: absolute;
    top:-5px;
    left:5px;
}
.camera_style_1 .left:after,.camera_style_1 .left:before{
    content:'';
    display:block;
    width:14px;
    height:4px;
    background-color:#e07b0f;
    position: absolute;
    top:1px;
    left:-7px;
}
.camera_style_1 .left:before{
    background-color:#016675;
    top:-3px;
    border-top-left-radius:1px;
    border-top-right-radius:1px;
}
.camera_style_1 .right{
    width:80px;
    height:14px;
    background-color:#016675;
    position: absolute;
    top:1px;
    right:0;
    border-top-left-radius:1px;
    border-top-right-radius:1px;
}
.camera_style_1 .right:after{
    content:'';
    display:block;
    width:8px;
    height:8px;
    border-radius:50%;
    background-color:#fff;
    position: absolute;
    top:7px;
    left:4px;
}
.camera_style_1 .right:before{
    content:'';
    display:block;
    width:16px;
    height:4px;
    background-color:#e17c10;
    position: absolute;
    top:-4px;
    right:5px;
}
.camera_style_1 .whiteBlock{
    width:5px;
    height:11px;
    border-left:19px solid #fff;
    border-right:19px solid #fff;
    position: absolute;
    top:5px;
    right:7px;
}
.camera_style_1 .round{
    width:44px;
    height:44px;
    border-radius: 50%;
    background-color:#016675;
    border:6px solid #fff;
    position: absolute;
    top:24px;
    left:32px;
}
.camera_style_1 .round:after{
    content: '';
    display:block;
    width:34px;
    height:34px;
    background-color:#3e3c38;
    border-radius:50%;
    position: absolute;
    top:5px;
    left:5px;
}
.camera_style_1 .round:before{
    content: '';
    display:block;
    width:10px;
    height:5px;
    background-color:#fff;
    position: absolute;
    top:38px;
    right:-32px;
}
登入後複製

第二款相機

九款純CSS3繪製的復古相機特效代碼

html程式碼:

    
        
            <div></div>             <div></div>         
        
            <div></div>         
    
登入後複製
css程式碼:


#

.camera_style_2{
    width:120px;
    height:90px;
    margin:0 auto;
    position: absolute;
    top:50%;
    left:50%;
    margin-left:-60px;
    margin-top:-45px;
}
.camera_style_2 .header{
    width:100%;
    height:15px;
}
.camera_style_2 .main{
    width:100%;
    height:50px;
    background-color:#50544e;
    border-top:15px solid #b5475d;
    border-bottom:10px solid #b5475d;
    border-radius:6px;
    border-top-right-radius:0;
}
.camera_style_2 .round{
    width:56px;
    height:56px;
    background-color:#fff;
    border:4px solid #50544e;
    border-radius:50%;
    position: absolute;
    top:22px;
    left:28px;
}
.camera_style_2 .round:after{
    content:'';
    display:block;
    width:34px;
    height:34px;
    background-color:#252522;
    border-radius:50%;
    border:5px solid #b5475d;
    position: absolute;
    top:6px;
    left:6px;
}
.camera_style_2 .left{
    width:3px;
    height:7px;
    border-left:15px solid #50544e;
    border-right:20px solid #50544e;
    position: absolute;
    top:8px;
    left:5px;
}
.camera_style_2 .left:after{
    content:'';
    display:block;
    width:13px;
    height:6px;
    background-color:#fff;
    position: absolute;
    top:11px;
    left:7px;
}
.camera_style_2 .right{
    width:73px;
    height:14px;
    background-color:#b5475d;
    border-top-left-radius:6px;
    border-top-right-radius:6px;
    position: absolute;
    right:0;
    top:1px;
}
.camera_style_2 .right:after{
    content:'';
    display:block;
    width:9px;
    height:9px;
    background-color:#dbdbcc;
    border-radius:50%;
    position: absolute;
    top:10px;
    left:8px;
}
.camera_style_2 .right:before{
    content:'';
    display:block;
    width:4px;
    height:12px;
    border-left:15px solid #fff;
    border-right:20px solid #fff;
    position: absolute;
    top:7px;
    right:8px;
}
登入後複製

第三款相機

九款純CSS3繪製的復古相機特效代碼

html程式碼:

    
        
            <div></div>             <div></div>             <div></div>         
        <div></div>     
登入後複製
登入後複製
登入後複製
css程式碼:


.camera_style_3{
    width:120px;
    height:106px;
    margin:0 auto;
    position: absolute;
    top:50%;
    left:50%;
    margin-left:-60px;
    margin-top:-53px;
}
.camera_style_3 .main{
    width:100%;
    height:71px;
    background-color:#f2a313;
    border-top-left-radius:10px;
    border-top-right-radius:10px;
}
.camera_style_3 .main:before{
    content:'';
    display:block;
    width:56px;
    height:9px;
    background-color:#744f2d;
    border-top-left-radius:2px;
    border-top-right-radius:2px;
    position:absolute;
    top:-9px;
    left:32px;
}
.camera_style_3 .main:after{
    content:'';
    display:block;
    width:100%;
    height:15px;
    background-color:#e1991c;
    position: absolute;
    bottom:35px;
    left:0;
}
.camera_style_3 .footer{
    width:100%;
    height:35px;
    background-color:#744f2d;
    border-bottom-left-radius:10px;
    border-bottom-right-radius:10px;
}
.camera_style_3 .footer:after{
    content:'';
    display:block;
    width:80%;
    height:3px;
    background-color:#342316;
    border-radius:3px;
    position: absolute;
    bottom:16px;
    left:10%;
}
.camera_style_3 .left{
    width:30px;
    height:10px;
    border-radius:10px;
    background-color:#342316;
    position: absolute;
    top:5px;
    left:5px;
}
.camera_style_3 .left:after{
    content:'';
    display:block;
    width:14px;
    height:14px;
    background-color:#fff;
    border-radius:50%;
    position: absolute;
    top:13px;
    left:7px;
}
.camera_style_3 .center{
    width:42px;
    height:40px;
    border:5px solid #fff;
    border-radius:50%;
    position: absolute;
    top:3px;
    left:34px;
}
.camera_style_3 .center:after{
    content:'';
    display:block;
    width:32px;
    height:30px;
    background-color:#342316;
    border-radius:50%;
    position: absolute;
    top:5px;
    left:5px;
}
.camera_style_3 .right{
    width:25px;
    height:25px;
    background-color:#342316;
    border-radius:50%;
    position: absolute;
    top:5px;
    right:5px;
}
.camera_style_3 .right:after{
    content:'';
    display:block;
    width:13px;
    height:13px;
    background-color:#fff;
    border-radius:50%;
    position: absolute;
    top:30px;
    right:0;
}
登入後複製

#第四款相機

九款純CSS3繪製的復古相機特效代碼

html程式碼:

    
        
            <div></div>             <div></div>             <div></div>         
        <div></div>     
登入後複製
登入後複製
登入後複製
css程式碼:


.camera_style_4{
    width:120px;
    height:90px;
    margin:0 auto;
    position: absolute;
    top:50%;
    left:50%;
    margin-left:-60px;
    margin-top:-45px;
    background-color:#f2a313;
    border-radius:14px;
}
.camera_style_4:after,.camera_style_4:before{
    content:'';
    display:block;
    width:130px;
    height:10px;
    background-color:#744f2d;
    border-radius:10px;
    position: absolute;
    left:-5px;
    top:15px;
    z-index:3;
}
.camera_style_4:after{
    top:80px;
}
.camera_style_4 .header{
    width:100%;
    height:22px;
}
.camera_style_4 .left{
    width:26px;
    height:8px;
    background-color:#744f2d;
    border-top-left-radius:50%;
    border-top-right-radius:50%;
    position: absolute;
    top:-8px;
    left:12px;
}
.camera_style_4 .center{
    width:28px;
    height:28px;
    background-color:#744f2d;
    border-radius:4px;
    position: absolute;
    top:-13px;
    left:46px;
}
.camera_style_4 .center:after{
    content:'';
    display:block;
    width:18px;
    height:18px;
    background-color:#fff;
    border-radius:4px;
    position: absolute;
    top:5px;
    left:5px;
}
.camera_style_4 .right{
    width:10px;
    height:10px;
    background-color:#322317;
    border-radius:50%;
    position: absolute;
    top:3px;
    right:22px;
}
.camera_style_4 .right:after{
    content:'';
    display:block;
    width:10px;
    height:10px;
    background-color:#322317;
    border-radius:50%;
    position: absolute;
    top:0;
    left:13px;
}
.camera_style_4 .main{
    width:54px;
    height:54px;
    border:7px solid #fff;
    border-radius:50%;
    position: absolute;
    top:19px;
    left:26px;
    z-index:4;
}
.camera_style_4 .main:after{
    content:'';
    display:block;
    width:38px;
    height:38px;
    background-color:#342316;
    border-radius:50%;
    position: absolute;
    top:8px;
    left:8px;
}
登入後複製

第五款相機:

九款純CSS3繪製的復古相機特效代碼##html程式碼:

    
        
            <div></div>             
                <div></div>                 
                    <div></div>                 
            
            <div></div>         
        
            <div></div>             <div></div>             <div></div>         
    
登入後複製

css程式碼:

.camera_style_5{
    width:120px;
    height:90px;
    margin:0 auto;
    position: absolute;
    top:50%;
    left:50%;
    margin-left:-60px;
    margin-top:-43px;
}
.camera_style_5 .header{
    width:100%;
    height:16px;
}
.camera_style_5 .left{
    width:20px;
    height:12px;
    background-color:#3e3d36;
    position: absolute;
    top:2px;
}
.camera_style_5 .left:after{
    content:'';
    display:block;
    width:8px;
    height:5px;
    background-color:#3e3d36;
    position: absolute;
    top:9px;
    left:6px;
}
.camera_style_5 .center{
    width:65px;
    height:16px;
    position: absolute;
    top:0;
    left:33px;
}
.camera_style_5 .center_innerLeft{
    width:20px;
    height:4px;
    background-color:#006674;
    position: absolute;
    top:12px;
    left:0;
}
.camera_style_5 .center_innerLeft:before{
    content:'';
    display:block;
    width:10px;
    height:5px;
    background-color:#3f3d39;
    position: absolute;
    top:-6px;
    right:0;
}
.camera_style_5 .center_innerLeft:after{
    content:'';
    display:block;
    width:4px;
    height:2px;
    background-color:#3f3d39;
    position: absolute;
    top:-2px;
    right:3px;
}
.camera_style_5 .center_innerRight{
    width:45px;
    height:10px;
    background-color:#006674;
    position: absolute;
    top:6px;
    right:0;
}
.camera_style_5 .center_innerRight_body{
    width:18px;
    height:7px;
    background-color:#fff;
    position: absolute;
    top:3px;
    right:12px;
}
.camera_style_5 .center_innerRight_body:before,.camera_style_5 .center_innerRight_body:after{
    content:'';
    display:block;
    width:6px;
    height:6px;
    background-color:#fff;
    border-radius:50%;
    position: absolute;
    top:0;
    left:-10px;
}
.camera_style_5 .center_innerRight_body:after{
    left:21px;
}
.camera_style_5 .right{
    width:16px;
    height:8px;
    background-color:#3e3d36;
    position: absolute;
    top:6px;
    right:0;
}
.camera_style_5 .right:after{
    content:'';
    display:block;
    width:6px;
    height:4px;
    background-color:#3e3d36;
    position: absolute;
    top:6px;
    left:5px;
}
.camera_style_5 .main{
    width:100%;
    height:52px;
    background-color:#e17c10;
    border-top:10px solid #016675;
    border-bottom:12px solid #016675;
    border-bottom-right-radius:10px;
    border-bottom-left-radius:10px;
}
.camera_style_5 .main_bg{
    width:60px;
    height:40px;
    background-color:#006674;
    position: absolute;
    top:26px;
    left:30px;
}
.camera_style_5 .main_bg:before,.camera_style_5 .main_bg:after{
    content:'';
    display:block;
    width:6px;
    height:6px;
    background-color:#fff;
    border-radius:50%;
    position: absolute;
    top:-8px;
    left:-6px;
}
.camera_style_5 .main_bg:after{
    left:70px;
}
.camera_style_5 .outterRound{
    width:46px;
    height:46px;
    border:8px solid #fff;
    border-radius:50%;
    position: absolute;
    top:26px;
    left:29px;
}
.camera_style_5 .outterRound:before{
    content:'';
    display:block;
    width:15px;
    height:7px;
    background-color:#fff;
    -webkit-transform:rotate(-38deg);
    transform:rotate(-38deg);
    position: absolute;
    top:36px;
    left:-16px;
}
.camera_style_5 .outterRound:after{
    content:'';
    display:block;
    width:5px;
    height:5px;
    background-color:#3f3d39;
    border-radius:50%;
    position: absolute;
    top:39.5px;
    left:-14px;
}
.camera_style_5 .innerRound{
    width:34px;
    height:34px;
    background-color:#3e3c38;
    border:7px solid #e17c10;
    border-radius:50%;
    position: absolute;
    top:33px;
    left:36px;
}
登入後複製

第六款相機


九款純CSS3繪製的復古相機特效代碼html程式碼:

    
        
            <div></div>         
        
            <div></div>             <div></div>             <div></div>             <div></div>         
    
登入後複製

css程式碼:

.camera_style_6{
    width:120px;
    height:100px;
    margin:0 auto;
    position: absolute;
    top:50%;
    left:50%;
    margin-left:-60px;
    margin-top:-56px;
}
.camera_style_6 .header{
    width:100%;
    height:30px;
}
.camera_style_6 .top{
    width:24px;
    height:24px;
    background-color:#fff;
    border:8px solid #bc4c5f;
    border-radius:50%;
    position: absolute;
    top:-11px;
    left:40px;
}
.camera_style_6 .top:after{
    content:'';
    display:block;
    width:14px;
    height:5px;
    background-color:#bc4c5f;
    position: absolute;
    bottom:-10px;
    left:5px;
}
.camera_style_6 .main{
    width:100%;
    height:75px;
    background-color:#bd4b60;
    border-radius:10px;
}
.camera_style_6 .main:before{
    content:'';
    display:block;
    width:100%;
    height:40px;
    background-color:#555953;
    position: absolute;
    bottom:8px;
    left:0;
}
.camera_style_6 .main_left{
    width:13px;
    height:6px;
    background-color:#fff;
    position: absolute;
    top:35px;
    left:8px;
}
.camera_style_6 .main_left:after{
    content:'';
    display:block;
    width:6px;
    height:6px;
    background-color:#fff;
    border-radius:50%;
    position: absolute;
    top:0;
    right:-9px;
}
.camera_style_6 .main_right{
    width:2px;
    height:12px;
    border-left:14px solid #fff;
    border-right:18px solid #fff;
    position: absolute;
    top:35px;
    right:6px;
}
.camera_style_6 .main_round{
    width:46px;
    height:46px;
    background-color:#be4a60;
    border-radius:50%;
    border:6px solid #fff;
    position: absolute;
    bottom:-3px;
    left:14px;
}
.camera_style_6 .main_round:after{
    content:'';
    display:block;
    width:36px;
    height:36px;
    background-color:#252522;
    border-radius:50%;
    position: absolute;
    top:5px;
    left:5px;
}
.camera_style_6 .main_line,.camera_style_6 .main_line:before,.camera_style_6 .main_line:after{
    width:12px;
    height:5px;
    background-color:#3e3d36;
    position: absolute;
    top:61px;
    left:78px;
}
.camera_style_6 .main_line:before{
    content:'';
    display:block;
    top:8px;
    left:0;
}
.camera_style_6 .main_line:after{
    content:'';
    display:block;
    top:16px;
    left:0;
}
登入後複製

第七款相機


九款純CSS3繪製的復古相機特效代碼html程式碼:

    
        
            <div></div>             <div></div>         
    
登入後複製

css程式碼:

.camera_style_7{
    width:120px;
    height:80px;
    background-color:#c34e5c;
    border-radius:10px;
    position: absolute;
    top:50%;
    left:50%;
    margin-top:-40px;
    margin-left:-60px;
}
.camera_style_7:before,.camera_style_7:after{
    content:'';
    display:block;
    width:18px;
    height:5px;
    background-color:#51524d;
    border-top-left-radius:4px;
    border-top-right-radius:4px;
    position: absolute;
    top:-5px;
}
.camera_style_7:before{
    left:10px;
}
.camera_style_7:after{
    right:10px;
}
.camera_style_7 .main{
    width:100%;
    height:35px;
    background-color:#4f534d;
    position: absolute;
    top:28px;
    left:0;
}
.camera_style_7 .main:before{
    content:'';
    display:block;
    width:100%;
    height:5px;
    background-color:#4f534d;
    position: absolute;
    top:-8px;
    left:0;
}
.camera_style_7 .main:after{
    content:'';
    display:block;
    width:40px;
    height:96px;
    background-color:#4f534d;
    border-radius:12px;
    position: absolute;
    top:-36px;
    left:40px;
    z-index:1;
}
.camera_style_7 .whiteBlock{
    width:50px;
    height:7px;
    border-left:16px solid #fff;
    border-right:16px solid #fff;
    position: absolute;
    top:14px;
    left:19px;
}
.camera_style_7 .whiteBlock:before{
    content:'';
    display:block;
    width:24px;
    height:14px;
    background-color:#fff;
    border-radius:3px;
    position: absolute;
    top:-44px;
    left:13px;
    z-index:2;
}
.camera_style_7 .whiteBlock:after{
    content:'';
    display:block;
    width:10px;
    height:10px;
    background-color:#fff;
    border-radius:50%;
    position: absolute;
    top:-38px;
    left:70px;
}
.camera_style_7 .round{
    width:28px;
    height:28px;
    background-color:#c34e5c;
    border:4px solid #fff;
    border-radius:50%;
    position: absolute;
    top:0;
    left:42px;
    z-index:2;
}
.camera_style_7 .round:after{
    content:'';
    display:block;
    width:18px;
    height:18px;
    background-color:#3e3c38;
    border-radius:50%;
    position: absolute;
    top:5px;
    left:5px;
}
登入後複製

第八款相機

九款純CSS3繪製的復古相機特效代碼html程式碼:

    
        <div></div>         <div></div>     
登入後複製

css程式碼:

.camera_style_8{
    width:120px;
    height:60px;
    background-color:#e99e1e;
    border-radius:12px;
    border-top:13px solid #744f2d;
    border-bottom:7px solid #f2a313;
    position: absolute;
    top:50%;
    left:50%;
    margin-top:-40px;
    margin-left:-60px;
}
.camera_style_8:before{
    content:'';
    display:block;
    width:40px;
    height:100px;
    background-color:#3e3c38;
    border-top-left-radius:22px 50px;
    border-top-right-radius:12px 10px;
    border-bottom-left-radius:20px 40px;
    border-bottom-right-radius:16px 6px;
    position: absolute;
    bottom:-10px;
    left:-20px;
}
.camera_style_8:after{
    content:'';
    display:block;
    width:18px;
    height:7px;
    background-color:#fff;
    border-radius:28px/10px;
    position:absolute;
    top:-24px;
    left:-4px;
}
.camera_style_8 .round{
    width:64px;
    height:64px;
    background-color:#fff;
    border:10px solid #f2a313;
    border-radius:50%;
    position: absolute;
    top:-12px;
    left:23px;
    z-index:3;
}
.camera_style_8 .round:after{
    content:'';
    display:block;
    width:30px;
    height:30px;
    background-color:#3e3c38;
    border:10px solid #764e2d;
    border-radius:50%;
    position: absolute;
    top:7px;
    left:7px;
}
.camera_style_8 .whiteBlock{
    width:64px;
    height:25px;
    background-color:#f2a313;
    border-top-left-radius:50%;
    border-top-right-radius:50%;
    position: absolute;
    top:-20px;
    left:33px;
    z-index:1;
}
.camera_style_8 .whiteBlock:before{
    content:'';
    display:block;
    width:10px;
    height:10px;
    background-color:#fff;
    border-radius:50%;
    position: absolute;
    top:23px;
    left:74px;
}
.camera_style_8 .whiteBlock:after{
    content:'';
    display:block;
    width:7px;
    height:7px;
    background-color:#fff;
    border-radius:50%;
    position: absolute;
    top:36px;
    left:76px;
}
登入後複製

第九款相機

九款純CSS3繪製的復古相機特效代碼html程式碼:

    
        
            <div></div>             <div></div>             <div></div>         
        <div></div>     
登入後複製
登入後複製
登入後複製

css程式碼:

.camera_style_9{
    width:120px;
    height:70px;
    background-color:#e17c10;
    border-top:8px solid #016675;
    border-bottom:6px solid #016675;
    position: absolute;
    top:50%;
    left:50%;
    margin-left:-60px;
    margin-top:-41px;
}
.camera_style_9:before{
    content:'';
    display:block;
    width:50px;
    height:50px;
    background-color:#026573;
    border:6px solid #fff;
    border-radius:50%;
    position: absolute;
    bottom:-4px;
    left:29px;
}
.camera_style_9:after{
    content:'';
    display:block;
    width:34px;
    height:34px;
    background-color:#3e3c38;
    border-radius:50%;
    position:absolute;
    bottom:10px;
    left:43px;
}
.camera_style_9 .whiteBlock{
    width:60px;
    height:10px;
    border-left:20px solid #fff;
    border-right:20px solid #fff;
    position: absolute;
    top:3px;
    left:10px;
}
.camera_style_9 .whiteBlock:after{
    content:'';
    display:block;
    width:9px;
    height:9px;
    border-radius:50%;
    background-color:#fff;
    position: absolute;
    top:0.5px;
    right:3px;
}
.camera_style_9 .header{
    width:100%;
    height:20px;
    position: absolute;
    top:-28px;
    left:0;
}
.camera_style_9 .left{
    width:0;
    height:0;
    border:10px solid transparent;
    border-bottom:8px solid #00606f;
    position: absolute;
    bottom:0;
    left:5px;
}
.camera_style_9 .left:before{
    content:'';
    display:block;
    width:12px;
    height:4px;
    background-color:#e07c13;
    position: absolute;
    bottom:-5px;
    left:-6px;
}
.camera_style_9 .left:after{
    content:'';
    display:block;
    width:4px;
    height:3px;
    background-color:#016673;
    position: absolute;
    bottom:-1px;
    left:-2px;
}
.camera_style_9 .center{
    width:38px;
    height:10px;
    background-color:#fff;
    border:7px solid #016675;
    border-top-left-radius:6px;
    border-top-right-radius:6px;
    border-bottom:none;
    position: absolute;
    bottom:0;
    left:34px;
}
.camera_style_9 .right{
    width:16px;
    height:4px;
    background-color:#00606f;
    position: absolute;
    bottom:0;
    right:5px;
}
.camera_style_9 .right:before{
    content:'';
    display:block;
    width:16px;
    height:4px;
    background-color:#e17b12;
    position:absolute;
    bottom:4px;
    right:0;
}
.camera_style_9 .right:after{
    content:'';
    display:block;
    width:4px;
    height:3px;
    background-color:#006775;
    position:absolute;
    bottom:8px;
    right:6px;
}
登入後複製

PS: 篇幅有點長,程式碼都提供了,有興趣的可以試試看。

更多酷炫CSS3、html5、javascript特效程式碼,盡在:

js特效大全

以上是九款純CSS3繪製的復古相機特效代碼的詳細內容。更多資訊請關注PHP中文網其他相關文章!

本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn

熱AI工具

Undresser.AI Undress

Undresser.AI Undress

人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover

AI Clothes Remover

用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool

Undress AI Tool

免費脫衣圖片

Clothoff.io

Clothoff.io

AI脫衣器

AI Hentai Generator

AI Hentai Generator

免費產生 AI 無盡。

熱門文章

R.E.P.O.能量晶體解釋及其做什麼(黃色晶體)
4 週前 By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O.最佳圖形設置
4 週前 By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O.如果您聽不到任何人,如何修復音頻
4 週前 By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25:如何解鎖Myrise中的所有內容
1 個月前 By 尊渡假赌尊渡假赌尊渡假赌

熱工具

記事本++7.3.1

記事本++7.3.1

好用且免費的程式碼編輯器

SublimeText3漢化版

SublimeText3漢化版

中文版,非常好用

禪工作室 13.0.1

禪工作室 13.0.1

強大的PHP整合開發環境

Dreamweaver CS6

Dreamweaver CS6

視覺化網頁開發工具

SublimeText3 Mac版

SublimeText3 Mac版

神級程式碼編輯軟體(SublimeText3)

純CSS3怎麼實現波浪效果? (程式碼範例) 純CSS3怎麼實現波浪效果? (程式碼範例) Jun 28, 2022 pm 01:39 PM

純CSS3怎麼實現波浪效果?這篇文章就來跟大家介紹一下使用 SVG 和 CSS 動畫來製作波浪效果的方法,希望對大家有幫助!

巧用CSS實現各種奇形怪狀按鈕(附代碼) 巧用CSS實現各種奇形怪狀按鈕(附代碼) Jul 19, 2022 am 11:28 AM

這篇文章帶大家看看怎麼使用 CSS 輕鬆實現高頻出現的各類奇形怪狀按鈕,希望對大家有幫助!

css怎麼隱藏元素但不佔空間 css怎麼隱藏元素但不佔空間 Jun 01, 2022 pm 07:15 PM

兩種方法:1、利用display屬性,只要為元素加上「display:none;」樣式即可。 2.利用position和top屬性設定元素絕對定位來隱藏元素,只需為元素加上「position:absolute;top:-9999px;」樣式。

css3怎麼實現花邊邊框 css3怎麼實現花邊邊框 Sep 16, 2022 pm 07:11 PM

在css中,可以利用border-image屬性來實作花邊邊框。 border-image屬性可以使用圖片來建立邊框,即給邊框加上背景圖片,只需要將背景圖片指定為花邊樣式即可;語法「border-image: url(圖片路徑) 向內偏移值圖像邊界寬度outset 是否重複;」。

原來利用純CSS也能實現文字輪播與圖片輪播! 原來利用純CSS也能實現文字輪播與圖片輪播! Jun 10, 2022 pm 01:00 PM

怎麼製作文字輪播與圖片輪播?大家第一想到的是利用js,其實利用純CSS也能實現文字輪播與圖片輪播,下面來看看實作方法,希望對大家有幫助!

css3如何實現滑鼠點擊圖片放大 css3如何實現滑鼠點擊圖片放大 Apr 25, 2022 pm 04:52 PM

實作方法:1、使用「:active」選擇器選取滑鼠點擊圖片的狀態;2、使用transform屬性和scale()函數實現圖片放大效果,語法「img:active {transform: scale(x軸放大倍率,y軸放大倍率);}」。

css3怎麼設定動畫旋轉速度 css3怎麼設定動畫旋轉速度 Apr 28, 2022 pm 04:32 PM

在css3中,可以利用「animation-timing-function」屬性來設定動畫旋轉速度,該屬性用於指定動畫將如何完成一個週期,設定動畫的速度曲線,語法為「元素{animation-timing-function:速度屬性值;}」。

css3動畫效果有變形嗎 css3動畫效果有變形嗎 Apr 28, 2022 pm 02:20 PM

css3中的動畫效果有變形;可以利用「animation:動畫屬性@keyframes ..{..{transform:變形屬性}}」實現變形動畫效果,animation屬性用於設定動畫樣式,transform屬性用於設定變形樣式。

See all articles