Css创意特效整理(1)

一、冒泡公告栏

<div id="broadcast">
<!--设置速度与方向-->
    <marquee id="broadcast" scrollamount="1" direction="down" scrolldelay="150" 
    onmouseover="this.stop()" onmouseout="this.start()" ;="">
        Да здравствует коммунизм!  пролетарии всего мира объединились!<!--设置公告栏内容-->
    </marquee>
</div>
#broadcast{
    
    
    color: #ffb800;
    font-weight: bold;
    font-size: large;
    margin-top: 15px;
    height: 30px;
    position: static;
    visibility: visible;
    width: 70%;
}/*冒泡公告栏*/

二、登录入口

<div id="bigBox">
    <!--        <body text="#8a2be2">-->
    <div class="title">
        <h2>вход</h2><!--登录标题-->
    </div>
    <div class="inputBox">
        <div class="inputText">
            <input type="text" placeholder="Имя пользователя"><!--用户名框-->
        </div>
        <div class="inputText">
            <input type="password" placeholder="пароль"><!--密码框-->
        </div>
        <a href="home(Rus).html">
            <input type="button" class="inputButton" value="вход" onclick="window.location.href('home(Rus).html')"><!--登录按钮-->
        </a>
    </div>
    <br>
    <div class="register"><!--没有注册的话-->
        <span>Никаких счетов?</span><a href="https://www.bilibili.com/"> зарегистрироваться немедленно!</a>
    </div>
</div>
#bigBox{
    
    /*整个界面框*/
    margin: auto;
    margin-top: 200px;
    padding: 20px 50px;
    background-color: rgba(255, 0, 0, 0.44);
    width: 400px;
    height: 300px;
    /*登录边界圆滑程度*/
    border-radius: 20px;
    text-align: center;
}

#bigBox .title{
    
    /*登陆标题*/
    font-family: "Tw Cen MT";
    color: #ffb200;
    font-size: x-large;
}
#bigBox h1{
    
    
    color: #ffffff;
}

#bigBox .inputBox{
    
    
    margin-top: 30px;
}/*输入框与标题的间距*/

#bigBox .inputBox .inputText {
    
    
    margin-top: 20px;
}

#bigBox .inputBox .inputText input{
    
    
    border: 0;
    padding: 10px 10px;
    border-bottom: 1px solid #d7153b;
    background-color: rgba(210, 174, 0, 0.27);
    color: white;
    /*color: #fffc00;*/
}

#bigBox .inputBox .inputButton{
    
    
    border: 0;
    width: 150px;
    height: 35px;
    color: aliceblue;
    margin-top: 30px;
    border-radius: 20px;
    background-image: linear-gradient(to left, #f50e0e 0%, #dc3232 33%, #f65e1b 66%, #e78b19 100%);
}/*登录按钮*/
#bigBox .register span{
    
    
    font-family: 等线;
    /*font-style: oblique;*/
    color: white;
    text-decoration: none;
}
#bigBox .register a{
    
    
    font-family: "Tw Cen MT";
    color: #eabb14;
    text-decoration: none;
}

三、导航栏

<nav class="top">
    <ul><!--按钮-->
        <li><a href="#home">Домашняястраница</a></li>
        <li><a href="#events">Факты</a></li>
        <li><a href="#Illustrated books">иллюстрировать</a></li>
        <li><a href="#contact">связь</a></li>
    </ul>
</nav><!--导航栏-->
.top{
    
    
    /*position: fixed;*/
    /*overflow: hidden;*/
    position: relative;
    top: 0;
    height: 45px;
    width: 100%;
    background-image: linear-gradient(to bottom, #860000, #b40000, #920000);
    margin: 0;
    padding: 0;
    font-weight: bolder;
    font-family: "Tw Cen MT Condensed Extra Bold";
    /*font-weight: lighter;*/
    transform: translate(0px,70px);
}/*导航栏总览*/
ul{
    
    
    position: absolute;
    top: 57%;
    left: 60%;
    transform: translate(-20%,-60%);
    display: flex;
    margin: 0;
    padding: 0;
    /*background: #ff0000;*/
    border-radius: 5px;
}/*文字链接*/
ul li{
    
    
    list-style: none;
}
ul li a{
    
    
    position: relative;
    display: block;
    text-align: center;
    margin: 0 5px;
    color: #ff0000;
    font-size: 20px;
    text-decoration: none;
    text-transform: uppercase;
    /*transition: .5s;*/
    padding: 5px 10px;
    border-radius: 5px;
    /*background-color: #ffd300;*/
    background-image: linear-gradient(to bottom, #ff6600 0%, #ffab00 33%, #ffc700 66%, #ffdc00 100%);
}/*文字框与文字*/
ul li a:hover{
    
    
    color: #fffc00;
    /*background: red;*/
    transition: .5s;
    background-image: linear-gradient(to bottom, #bb0000 33%, #ff0000 0%, #ff0000 100%, #b60000 66%);
}/*悬浮状态的文本框与文字*/
ul li a:before{
    
    
    content: '';
    position: absolute;
    bottom: 12px;
    left: 12px;
    width: 20px;
    height: 12px;
    border: 3px solid #ffc101;
    border-width: 0 0 3px 3px;
    transition: .5s;
    opacity: 0;
}/*未悬浮时文字前的特效*/
ul li a:hover:before{
    
    
    bottom: -6px;
    left: -6px;
    opacity: 1;
    border-radius: 2px;
}/*悬浮时文字前的特效*/
ul li a:after{
    
    
    content: '';
    position: absolute;
    top: 12px;
    right: 12px;
    width: 20px;
    height: 12px;
    border: 3px solid #ffb800;
    border-width: 3px 3px 0 0;
    transition: .5s;
    opacity: 0;
}/*未悬浮时文字后的特效*/
ul li a:hover:after{
    
    
    top: -6px;
    right: -6px;
    opacity: 1;
    border-radius: 2px;
}/*悬浮时文字后的特效*/

猜你喜欢

转载自blog.csdn.net/qq_52480906/article/details/116912970