小编Shy*_*Shy的帖子

如何在Material Design Lite中使用自定义颜色?

我是Material Design Lite的新手.我想使用自定义配色方案,特别是原色强调色.

我见过他们的主题构建工具,但它只提供了一些颜色.

我怎样才能做到这一点?如何在我的网站中使用自定义(主要和重点)颜色(未包含在其主题构建工具中),使用Material Design Lite?

css themes material-design material-design-lite

6
推荐指数
1
解决办法
2053
查看次数

如何离线托管 Material Design 图标?

我想为我的离线 Web 开发项目离线托管 Material Icons(我部署的计算机上没有互联网)。从我的谷歌搜索中,我找到了这个答案。但这对我不起作用。我的问题是如何让它发挥作用。如何为我的离线项目离线托管材料设计图标?

我已在此处附加了 SSCCE 项目的 .zip 文件,该文件重现了该问题

基本上我从这里下载了MaterialIcons-Regular.eotMaterialIcons-Regular.ttfMaterialIcons-Regular.woffMaterialIcons-Regular.woff2将它们放在我的项目目录中。

这是我的索引文件:

<!DOCTYPE html>

<html>

<head>
    <title>MaterializeTest</title>

    <link rel="stylesheet" href="material-fonts.css" />
    <link type="text/css" rel="stylesheet" href="materialize.min.css" />

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width; initial-scale=1"/>

    <script src="jquery.min.js"></script>
    <script src="materialize.min.js"></script>
</head>

<body>
    <a href="#!"><i class="material-icons">chevron_left</i></a>
</body>

</html>
Run Code Online (Sandbox Code Playgroud)

这是 CSS 文件。

@font-face {
   font-family: 'Material Icons';
   font-style: normal;
   font-weight: 400;
   src: url(MaterialIcons-Regular.eot); /* For IE6-8 */
   src: local('Material Icons'),
        local('MaterialIcons-Regular'),
        url(MaterialIcons-Regular.woff2) format('woff2'), …
Run Code Online (Sandbox Code Playgroud)

javascript css materialize material-design google-fonts

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

在 Kali Linux 中,为什么我在 /usr/bin/ 中只看到 python2 和 python3 二进制文件(不是“python”二进制文件)并得到“python 命令未找到”

我正在运行最新版本的 Kali Linux:

\n
uname -a                           \nLinux User 5.14.0-kali4-amd64 #1 SMP Debian 5.14.16-1kali1 (2021-11-05) x86_64 GNU/Linux\n
Run Code Online (Sandbox Code Playgroud)\n

它已经随 Python 3.9.8 一起提供了。但我需要安装Python 2.7。所以我首先安装了它sudo apt install python2.7.18.但是发生了以下情况:

\n
python -V        \nCommand \'python\' not found, did you mean:\n  command \'python3\' from deb python3\n  command \'python\' from deb python-is-python3\n\npython2 -V  \nPython 2.7.18\n\npython3 -V       \nPython 3.9.8\n
Run Code Online (Sandbox Code Playgroud)\n

还:

\n
which python\npython not found\n
Run Code Online (Sandbox Code Playgroud)\n

我尝试过的:

\n

我检查了/usr/opt//usr/bin/等位置/usr/share/。我检查/usr/bin并找到了 python2 和 python3 二进制文件:

\n

在此输入图像描述

\n

所以我估计是python环境变量没有设置。我添加python=/usr/bin/python2 …

python linux python-2.x pyenv kali-linux

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

为什么这个$ _GET在GET提交表单后为空,为什么是"?" 附加到表单提交的URL

这是SSCCE展示我的问题.在页面顶部,$_GET打印出来.首次加载页面时,可以理解Array()将打印一个空数组.

但是formaction属性有一个空值,这意味着在页面提交到自身.价值methodGET.所以表格由GET提交.

因此,当表单通过GET提交给页面本身时,现在$_GET打印在页面顶部的数组不能为空.哦,但是!这就是问题所在.

提交表单时

  1. $_GET打印在页面顶部的数组为空.Array ()

  2. A ?附加到URL.例如,在表单提交之前,页面的URL是http://localhost/Test/index.php.提交表单后,页面重新加载并且URL变为http://localhost/Test/index.php?

问题是为什么?以及如何解决这个问题.

<?php 
print_r($_GET);//check
?>

<!DOCTYPE html>

<html>

<head>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.1/css/materialize.min.css"/>
    <script src="<script
  src="http://code.jquery.com/jquery-3.2.1.js"
  integrity="sha256-DZAnKJ/6XZ9si04Hgrsxu/8s717jcIzLy3oi35EouyE="
  crossorigin="anonymous"></script>"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.1/js/materialize.min.js"></script>
</head>

<body>
    <form action="" method="get">

        <div class="input-field">
            <input type="text" id="nameInput" class="validate" />
            <label for="nameInput">Name: </label>
        </div>


        <button type="submit" class="btn waves-light waves-effect">Submit Form</button>

    </form>
</body>

</html>
Run Code Online (Sandbox Code Playgroud)

html javascript php forms jquery

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

什么C数据类型应该用于包含2位HEXADECIMAL值的数组?

我正在尝试调试的程序中有以下数组:

static u8 info3[LEN] = {
  06,
  07,
  04,
  00,
  00,
  01,
  00,
  0e,
  03
};
Run Code Online (Sandbox Code Playgroud)

我收到以下错误:

test.c(45): error C2021: expected exponent value, not ','
Run Code Online (Sandbox Code Playgroud)

和#45行是包含的行0e,.根据这个MSDN资源,

预期的指数值,而不是'字符'

用作浮点常量指数的字符不是有效数字.一定要使用范围内的指数.

这告诉我编译器认为编译器认为info3包含浮点值.但是那里的值实际上是2位十六进制数.

所以问题是这里应该使用哪种数据类型来存储在这个数组中的值?

c arrays types compiler-errors

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

如何在此导航栏中的徽标中垂直居中img?

JSFiddle在这里.

正如您在给定的SSCCE中看到的那样,徽标中的图像与其旁边的文本不完全对齐.我需要它<img>并且<span>完美地相邻,因此它们是垂直 - 中间对齐的,而不是共享相同的基线.

我有这个:

在此输入图像描述

我需要这个:

在此输入图像描述

那我该怎么做?

给人vertical-align:middle;.brand-logo.brand-logo > img或两者.brand-logo > img.brand-logo > span没有帮助.

添加类valign-wrappera.brand-logo或者div.nav-wrapper还没有帮助.(来源)

<link href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/css/materialize.min.css" rel="stylesheet"/>


<nav class="black">
	<div class="nav-wrapper">

		<a class="brand-logo center brown-text text-lighten-4" href="#"><img alt="" src="https://s.w.org/about/images/logos/wordpress-logo-simplified-rgb.png" width="40px" height="40px" class="responsive-img" />
			<span>BRAND</span>
		</a>

	</div>
</nav>
Run Code Online (Sandbox Code Playgroud)

html css jquery materialize

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