首页 \ 问答 \ 我如何知道何时使用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])

我如何知道何时使用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
更新时间:2023-09-04 12:09

最满意答案

! 不是一个否定功能,它是一个宏。

请参阅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 a case 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 ...
  • 我删除tmp目录,守卫黄瓜很好:) I remove tmp dir , and guard cucumber works nice :)
  • 我相信你看到的是一个编译器警告,而不是一个实际的错误。 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 ...
  • 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 : ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。