小编Kra*_*ler的帖子

这些CSS规则的目的是什么?

因此,我一直在尝试自己寻找以下代码实际上对每种操作的作用,但我只是无法完全理解。

/*Global Style*/
*,
*::before,
*::after{
    margin: 0;
    padding: 0;
    box-sizing: inherit;
}
Run Code Online (Sandbox Code Playgroud)

我是从视频中复制的,因此并没有真正向我解释所有内容。如果您可以向我解释此代码,我将不胜感激!先谢谢了

css

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

如何让我的 cookie 同意横幅为每个用户(ip)弹出一次

首先,我知道之前已经回答过类似的问题,但我真的不明白,我现在是 jquery 的一个小人物,我真的不知道如何在我的代码中实现它或了解它是如何工作的。如果有人不仅可以给我解决方案,还可以解释它的作用以及如何做到这一点,那就太棒了。

所以这是我的 HTML

<div id="cookieConsent">
                    This website is using cookies. <a href="#" target="_blank">More info</a>.<a class="cookieConsentOK">That's Fine</a>
</div>
Run Code Online (Sandbox Code Playgroud)

显然,我已经链接了我的脚本文件和 jquery CDN,因此无需显示,现在这是我的 css。

/*Cookie Consent Begin*/
#cookieConsent {
    background-color: rgba(20,20,20,0.8);
    min-height: 26px;
    font-size: 14px;
    color: #ccc;
    line-height: 26px;
    padding: 8px 0 8px 30px;
    font-family: "Trebuchet MS",Helvetica,sans-serif;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: none;
    z-index: 9999;
    text-align: center;
}
#cookieConsent a {
    color: #4B8EE7;
    text-decoration: none;
}
#closeCookieConsent {
    display: inline-block;
    cursor: pointer;
    height: 20px;
    width: 20px;
    margin: …
Run Code Online (Sandbox Code Playgroud)

html javascript css jquery

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

类型错误:“str”和“int”的实例之间不支持“&gt;”,但我将字符串设为 Interger

我有一个我似乎无法修复的非常令人沮丧的错误,它告诉我字符串和整数不支持“<”,但我确保我使用 int() 函数将它们转换为整数

import random

print("Hi what is your name?")

name = input()

print("And your age please?")

age = input()

print(f"Now {name} pick a number that is lower than your age ({age}) but bigger than zero")

number_pick = input()

if number_pick != "":
    int(age)
    int(number_pick)
    if number_pick > 0:
        print(f"Good choice now the result of your {age} timesed by {number_pick} is..")
        print(age * number_pick)
    else:
        print("your number doesnt follow the requirements")
else:
    print("Please write your number pick")


Run Code Online (Sandbox Code Playgroud)

我失去了想法,我应该改变什么?

python python-3.x

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

标签 统计

css ×2

html ×1

javascript ×1

jquery ×1

python ×1

python-3.x ×1