首页 \ 问答 \ HTML5 + CSS3 VS标准HTML 4 [关闭](HTML5 + CSS3 VS Standard HTML 4 [closed])

HTML5 + CSS3 VS标准HTML 4 [关闭](HTML5 + CSS3 VS Standard HTML 4 [closed])

在环顾互联网时,我无法找到HTML5和标准HTML4的理想比较。 我知道HTML5的一些优点,如多媒体和新组件等。但我正在寻找两者的良好比较。 例如,我在脑海中有以下问题。

  • HTML5优于标准HTML4的主要优点是什么(我知道很多)
  • 使用HTML5有什么缺点(IE9之前不起作用)
  • 使用带有CSS3的HTML5与使用CSS的标准HTML4相比有什么优缺点。

在这里,我正在寻找使用HTML5和CSS3的优点和缺点。

谢谢你的时间。


As looking around the internet I am not able to find the desired comparison of HTML5 and standard HTML4. I know some of advantages of HTML5 like multimedia and new components etc. But I am looking for a nice comparison of both of these. For example I have following questions in my mind.

  • What are the major advantages of HTML5 over standard HTML4 (I know of many)
  • What are disadvantages of using HTML5 (Except it does not work before IE9)
  • What are the advantages and disadvantages using HTML5 with CSS3 over standar HTML4 with CSS.

Here I am looking for both the advantages and disadvantages of using HTML5 and CSS3.

Thanks for time.


原文:https://stackoverflow.com/questions/14576463
更新时间:2022-06-05 19:06

最满意答案

Unindent main()以及它下面的内容,现在它是Temp不是独立函数的方法。 您实际上是在尝试调用没有Temp实例的方法。

缩进是python如何确定方法,类,循环中的内容。 看这里:

编辑

class Temp():
    def __init__(self):
        # this method is in Temp
        pass

    def prettyPrint(self):
        # this method is also in temp
        print("I'm in temp")

def prettyPrint(self):
    #this is not in Temp (notice the indentation change)
    print("I'm not in temp")

if __name__ == "__main__":
    #this is not in temp either
    t = Temp()
    t.prettyPrint()
    prettyPrint(None)

Unindent main() and what's below it, right now it's a method of Temp not standalone function. You're essentially trying to call a method without an instance of Temp.

Indentation is how python determines what is in a method, class, loop or not. See here:

EDIT:

class Temp():
    def __init__(self):
        # this method is in Temp
        pass

    def prettyPrint(self):
        # this method is also in temp
        print("I'm in temp")

def prettyPrint(self):
    #this is not in Temp (notice the indentation change)
    print("I'm not in temp")

if __name__ == "__main__":
    #this is not in temp either
    t = Temp()
    t.prettyPrint()
    prettyPrint(None)

相关问答

更多
  • 查看关于重建的SQLAlchemy文档 : 从数据库行重新创建对象时,SQLAlchemy ORM不会调用__init__ 。 ORM的过程有点类似Python标准库的pickle模块,调用低级__new__方法,然后直接在实例上静静地恢复属性,而不是调用__init__ 。 如果您需要在数据库加载的实例准备就绪之前对其进行设置,则可以使用@reconstructor修饰器将方法标记为__init__的ORM对象。 每次加载或重建实例时,SQLAlchemy都会在没有参数的情况下调用此方法。 这对重新创建通 ...
  • 显然你不能使用不能作为上下文管理器启动的类,所以你必须在with块中使用它之前创建实例。 例如: try: ins = MyClass() except Exception as e: print "Cant initiate MyClass" else: with ins: pass 您可以通过将它们传递给Class来添加额外资源,而不是在启动期间创建它们: with spawnResource() as res, MyClass(res) as y: ...
  • 首先,你应该明白这一点 class Foo(object): bar = ['baz'] 和 class Foo(object): def __init__(self): self.bar = ['baz'] 意思是非常不同的东西,在第一种情况下, bar是一个类属性,对于Foo所有实例以及类Foo本身(它是type的实例,而不是Foo )是相同的,但是在第二个bar是Foo的每个实例的一个属性,并且根本不与该类关联! 如果你尝试这两种方法,并追加到bar ,首先, ...
  • 为什么不把初始化代码放在一个方法中,并从init调用它以及从中调用它需要的其他位置呢? Why not just put your initialisation code in a method and call it from init as well as the other locations you need it called from?
  • 在这种情况下,我认为夹具没有任何好处。 我只想在测试方法中创建对象。 有一个带有默认值的可选参数,然后在缺少参数时引发异常似乎很奇怪。 除非您确实需要自定义错误消息,否则请考虑删除默认值。 I don't see any benefit to the fixture in this situation. I would just create the object in the test method. Having an optional parameter with a default value an ...
  • 我相信这是高速公路本身的一个微妙的错误。 图书馆应该尽早初始化所有跑步者的属性。 请在错误跟踪器上提交问题 I believe it's a subtle bug in Autobahn itself. The library should initialize all runner's attributes early. Please file an issue on bug tracker
  • 来自pyzmq所有者minrk的回答: 您无法在使用多处理实例化子进程时发生的fork边界上传递zmq上下文或套接字。 您必须确保在进入子流程后创建Context 。 解: def work(): worker = LogWorker(port) worker.log_worker() workers = [ Process(target=work) for _ in range(n) ] answer from pyzmq owner minrk: You cannot pass zm ...
  • Unindent main()以及它下面的内容,现在它是Temp不是独立函数的方法。 您实际上是在尝试调用没有Temp实例的方法。 缩进是python如何确定方法,类,循环中的内容。 看这里: 编辑 : class Temp(): def __init__(self): # this method is in Temp pass def prettyPrint(self): # this method is also in temp ...
  • 这里的原因是: super(Main1,self).__init__(master) 将依次称之为: def create_wdgts(self): 这反过来会这样做: self.pointbttn["command"]= self.pointhndlr() 这不会将函数 self.pointhndlr给self.pointbttn["command"] ,而是调用self.pointhndlr ,并将结果self.pointbttn["command"] 。 解决方案:删除括号: self.poin ...
  • 你的init方法期望我的参数被初始化,而你的代码的另一个问题是self.bag将永远不会初始化为一个列表,如果len(i)不为零,如果它没有定义为list,那么你可以追加到bag之前。 下面的代码应该适合你想要的 class Bag: def __init__(self, i=None): self.bag = [] if i == None: pass # i is None, do nothing after create empty ba ...

相关文章

更多

最新问答

更多
  • 获取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的基本操作命令。。。