小编Law*_*ith的帖子

全屏背景颜色css3

在此输入图像描述我有一个渐变作为背景颜色,但它只是重复.我希望渐变拉伸到全屏,因此无法缩小并查看任何空白区域或重复渐变.

这是我身体的css

body {
text-align:center;
background: rgb(238,238,238); /* Old browsers */
background: -moz-linear-gradient(top,  rgba(238,238,238,1) 0%, rgba(89,89,89,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(238,238,238,1)), color-stop(100%,rgba(89,89,89,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top,  rgba(238,238,238,1) 0%,rgba(89,89,89,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top,  rgba(238,238,238,1) 0%,rgba(89,89,89,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top,  rgba(238,238,238,1) 0%,rgba(89,89,89,1) 100%); /* IE10+ */
background: linear-gradient(to bottom,  rgba(238,238,238,1) 0%,rgba(89,89,89,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#595959',GradientType=0 ); /* IE6-9 */
}
Run Code Online (Sandbox Code Playgroud)

html5 css3

4
推荐指数
1
解决办法
2万
查看次数

将两个id定义为一段css代码

我想知道是否有任何方法可以将两个部分id定义为一段css代码.

目前代码与id完全相同,是否有任何方法可以在一段代码中同时使用两个id而不是复制相同的代码.例如

滑块#nav ul

#slider ul {
list-style-type:none;
height:80px;
width:620px;
background: rgb(206,220,231); /* Old browsers */
background: -moz-linear-gradient(top,  rgba(206,220,231,1) 0%, rgba(89,106,114,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(206,220,231,1)), color-stop(100%,rgba(89,106,114,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top,  rgba(206,220,231,1) 0%,rgba(89,106,114,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top,  rgba(206,220,231,1) 0%,rgba(89,106,114,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top,  rgba(206,220,231,1) 0%,rgba(89,106,114,1) 100%); /* IE10+ */
background: linear-gradient(to bottom,  rgba(206,220,231,1) 0%,rgba(89,106,114,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#cedce7', endColorstr='#596a72',GradientType=0 ); /* IE6-9 */
-webkit-box-shadow: inset …
Run Code Online (Sandbox Code Playgroud)

html css css3

0
推荐指数
1
解决办法
124
查看次数

第70行,第191列:重复ID配方滑动.有解决方法吗?

尝试验证我的代码时,我遇到了三个错误.

echo '<section id="featured">';
    $recipes = mysql_query("
        SELECT `id`,`name`, `image`, `description`
        FROM `recipe` 
        ORDER BY RAND() LIMIT 4;
    ");

    while ($recipe = mysql_fetch_assoc($recipes)) {
    echo '<section id="recipeslide">';
    $recipe_id = $recipe['id'];


    echo "<a href='php/recipe.php?id=$recipe_id'><img src=\"{$recipe['image']}\" height=100 width=100 /></a><br />";

    echo '</section>';
    }


    echo '</section>';
Run Code Online (Sandbox Code Playgroud)

这是我使用recipeslide的唯一的地方,但我认为验证器在某种程度上变得困惑,并想知道如何解决这个问题或者我是否忽略它?

它指出了另外两个被认为是重复的Id.

它也抱怨alt标签,但我不认为它们会在这种情况下有效.

在此输入图像描述

html php

-1
推荐指数
1
解决办法
47
查看次数

标签 统计

css3 ×2

html ×2

css ×1

html5 ×1

php ×1