CSS/HTML代码不是';不工作,字体不';不要申请

CSS/HTML代码不是';不工作,字体不';不要申请,html,css,input,Html,Css,Input,当我尝试运行这个CSS/HTML代码时(这在webkit浏览器中),它不起作用。输入框中的字体未应用Lato字体: <html> <head> <link href='http://fonts.googleapis.com/css?family=Lato:300' rel='stylesheet' type='text/css'> <title>Dumb Search</title>

当我尝试运行这个CSS/HTML代码时(这在webkit浏览器中),它不起作用。输入框中的字体未应用Lato字体:

<html>
    <head>
        <link href='http://fonts.googleapis.com/css?family=Lato:300' rel='stylesheet'
        type='text/css'>
        <title>Dumb Search</title>
        <meta name="apple-mobile-web-app-capable" content="yes"
        />
        <link rel="apple-touch-icon-precomposed" href="../ds.png" />
        <meta name="viewport" content="width = device-width, user-scalable = no, initial-scale = 0.8">
        <style>
            .box {
                padding:20px;
                width:290px;
                box-shadow:0px 1px 3px -1px #c3c3c3;
                background-color:white;
                color:gray;
                font-family:Lato;
                text-align:left;
            }

        </style>
    </head>
    <body bgcolor="#f5f5f5">
        <center>
            <br>
            <div style="position:relative;width:342px;">
                <form action="searchcompleted.php" style="display:inline;">
                    <input name="q" value="Search, or tap the camera" class="box" style="border:0;outline:0;width:340px;color:#A0A0A0;padding-top:15px;padding-bottom:15px;"
                    onfocus="if (this.value == 'Search, or tap the camera') {this.value = '';}"
                    onblur="if (this.value == '') {this.value = 'Search, or tap the camera';}">
                </form>
                <img src="http://i45.tinypic.com/30vkbhj.jpg" style="position:absolute;top:0px;left:278px;opacity:0.4;height:30px;padding:15px;padding-right:17px;"
                onclick='void(0);document.getElementById("thisone").click();'>
                <form style="display:inline;" action="http://www.dumbsearch.com/dumbocr/post.php"
                method="post" enctype="multipart/form-data" id="sniff">
                    <input accept="image/*" type="file" style="display:none;" id="thisone"
                    onchange='document.getElementById("scan").style.display="block";' name="photo">
                    <div onclick='void(0);document.getElementById("sniff").submit();' style="position:absolute;top:65px;left:195px;background-color:white;border:0;box-shadow: 0px 1px 3px -1px #C3C3C3;padding:20px;color:#0EBFE9;padidng-left:25px;padding-right:25px;z-index:4;display:none;font-family:Lato;"
                    id="scan">Touch to scan</div>
                </form>
            </div>
            <br>
            <div class="box"></div>
    </body>

</html>

哑巴搜索
.盒子{
填充:20px;
宽度:290px;
盒影:0px 1px 3px-1px#c3c3;
背景色:白色;
颜色:灰色;
字体系列:Lato;
文本对齐:左对齐;
}

触摸扫描

非常感谢你!提前


编辑:查看此处:

键入
font-family
声明,如下所示:
font-family:'Lato'它必须在引号中

字体系列“lato”在CSS中不可用,因此请使用此代码导入“lato”。下载Lato的ttf和eot文件

@font-face
{
font-family: FirstFont;
src: url('.ttf'),
     url('.eot'); 
}

在字体系列中试试这个

 @font-family
{
font-family: FirstFont;
src: url('.ttf');
} 

问题显然不是关于字体,或者是关于谷歌字体,而是关于字体大小。浏览器通常在输入框中应用较小的字体大小,大约是复制文本大小的90%。如果使用Chrome中的开发者工具(F12)检查页面,可以看到应用于元素的声明之一是
font:-webkit small control
。这将同时设置字体系列和字体大小,现在只覆盖字体系列部分

例如,要使输入框中的文本与文档正文中的文本大体相同(或者,正式地说,与周围元素中的文本相同),只需添加以下CSS规则:

input { font-size: 100%; }

这部分代码中没有应用字体<代码>
您使用的浏览器是什么@字体规则在IE 8和更早版本中不起作用。对我来说很有用:为什么字体大小应该是这样?第一个类中没有应用字体大小。应在说明中指定字体大小。字体和字体大小是两个不同的东西。不,我以前用过拉托。看这里:(通过谷歌字体)是的,这就是我需要的。对不起,让大家感到困惑。我的问题不清楚!