我如何知道何时使用CSS,ID或HTML5来使用CSS在HTML中进行布局?(How do I know when to use a Class, an ID or HTML5 to make layouts in HTML using CSS? [closed])
我正在建立一个网站,我希望将每个元素都包含在一个单独的布局中,以使其更有条理。 只是想知道什么时候选择其中一个是合适的。 根据情况考虑哪种布局元素最佳(或首选)。 有时我可以使用标签并插入ID,或使用类或使用HTML5。 实际上,在所有选择中,HTML5布局似乎更简单,更容易。 我也在考虑使用表格。 请建议使用哪一个。 谢谢。
I'm building a website and I want to include every element in a separate layout to make it more organized. Just wanna know when it is appropriate to select one or the other. To consider what layout element is best (or preferred) depending the situation. Sometimes I can just use a tag and insert an ID, or use a Class or use HTML5. Actually, of all the choices HTML5 layouts seem the simpler and easier way to go. I also am considering using tables. Kindly recommend which one to use. Thank you.
原文:https://stackoverflow.com/questions/26307977
最满意答案
!
不是一个否定功能,它是一个宏。请参阅elixir中的代码,
lib/elixir/lib/kernel.ex: 1552
,defmacro !value defmacro !{:!, _, [value]} do optimize_boolean( quote do case unquote(value) do x when :"Elixir.Kernel".in(x, [false, nil]) -> false _ -> true end end ) end defmacro !value do optimize_boolean( quote do case unquote(value) do x when :"Elixir.Kernel".in(x, [false, nil]) -> true _ -> false end end ) end
!
宏扩展是一个case statement
,这是不允许在灵药卫士。而不是一个erlang函数:
@spec not true :: false @spec not false :: true def not value do :erlang.not(value) end
!
is not a negation function, it is a macro.See the code in elixir,
lib/elixir/lib/kernel.ex: 1552
,defmacro !value defmacro !{:!, _, [value]} do optimize_boolean( quote do case unquote(value) do x when :"Elixir.Kernel".in(x, [false, nil]) -> false _ -> true end end ) end defmacro !value do optimize_boolean( quote do case unquote(value) do x when :"Elixir.Kernel".in(x, [false, nil]) -> true _ -> false end end ) end
The
!
macro expanded is acase statement
, which is not allowed in elixir guards.And not is a erlang function:
@spec not true :: false @spec not false :: true def not value do :erlang.not(value) end
相关问答
更多-
您正在调用您的布尔属性currentUserIsAdmin作为方法。 你想调用实际的方法,而不是isCurrentUserAdmin canActivate():boolean{ return this.userService.currentUserIsAdmin(); } 应该成为 canActivate():boolean{ return this.userService.isCurrentUserAdmin(); } You are calling your boolean pro ...
-
警卫安装错误(Guard installation error)[2022-02-17]
我删除tmp目录,守卫黄瓜很好:) I remove tmp dir , and guard cucumber works nice :) -
理解与警卫(for comprehensions with if guard)[2022-03-21]
我相信你看到的是一个编译器警告,而不是一个实际的错误。 RightProjection不支持withFilter ,这是一个守护条件的“首选”(但尚未要求),所以使用普通的旧filter 。 至于这些功能的区别以及为什么会出现这种情况,请查看下面的链接以获取解释。 http://scala-programming-language.1934581.n4.nabble.com/Rethinking-filter-td2009215.html#a2009218 I believe what you are se ... -
! 不是一个否定功能,它是一个宏。 请参阅elixir中的代码, lib/elixir/lib/kernel.ex: 1552 , defmacro !value defmacro !{:!, _, [value]} do optimize_boolean( quote do case unquote(value) do x when :"Elixir.Kernel".in(x, [false, nil]) -> false ...
-
您需要在providers数组中的模块装饰器中导入AuthenticationService 。 这就是错误所指示的! 根据你在这里的内容,我没有看到AuthenticationService作为提供者添加到你的任何模块中。 除非它在你的app.modules.ts ,这里没有显示。 You need to import the AuthenticationService in your module decorator in the providers array. That is what that e ...
-
不允许在Guard中使用函数。(Use of function in Guard not allowed. Suggestions for alternate implementation wanted)[2024-03-27]
Erlang故意限制你可以在守卫中调用哪些功能。 以下是对此的合理性的一个相当新近的讨论,其优点和缺点。 唯一的解决办法就是用case 。 你可以很容易地重写这段代码来用case : find_factors(A, B, FactorThis) -> case is_a_square(B) of true -> io:format(" find_factors true ~w ~w~n", [A, B]), {ok, A + B, A - B ... -
我在Ubuntu上设置guard-rspec gem没有问题。 我假设你不使用sudo来安装你的宝石。 这会造成问题。 回复关于使用sudo安装gems的评论的更新。 如果你sudo gem install - 你真的不应该这样做 - 那么你的终端将无法访问宝石。 如果是这种情况,那么卸载所有的宝石,然后使用bundle,rvm或其他没有sudo命令的软件重新安装。 在Ubuntu上使用命令shell时,您没有以root身份登录。 我强烈建议你使用rvm来管理你的宝石。 它们将被安装到您的主文件夹。更多详情 ...
-
一种方法是在IoC容器中扩展Laravel身份验证类,以包含例如name()方法,该方法检查当前会话使用哪个防护,并在该Guard实例上调用user() 。 另一种方法是在Blade模板中简单使用if语句 : @if(Auth::guard('admin')->check()) Hello {{Auth::guard('admin')->user()->name}} @elseif(Auth::guard('user')->check()) Hello {{Auth::guard('user ...
-
我想你必须为每个守卫所照顾的每个接口都有单独的标题。 显然, if(Auth::guard()=='admin'){ //////////////// }无效而没有提到警卫名称 I guess youll have to have separate headers for each of the interfaces taken care by each of your guards. Clearlyif(Auth::guard()=='admin'){ //////////////// } is not ...
-
您有重新定义错误,因为您确实在cpp文件中有重新定义: struct Snake{...}; 部分。 这不是您为struct的方法提供定义的方式。 这是一个简化的例子: 在标题中: struct Example { void foo(); }; 在cpp: void Example::foo() { //foo stuff } You have the redefinition error because you indeed have a redefinition in your cpp file : ...