减少HTML(样式)/ CSS代码(background-size:...在后台:...)

时间:2016-11-03 20:37:20

标签: html css

我需要帮助将background-size代码缩减为background属性。

代码:

<html style="background:black url('http://example.com/image.jpeg')center no-repeat;background-size:auto 125%;cursor:none">

我的尝试:

<html style="background:black url('http://example.com/image.jpeg')center auto 125% no-repeat;cursor:none">

任何其他减少代码的方法将不胜感激。另外,没有必要告诉我关于&lt; / HTML&GT;

1 个答案:

答案 0 :(得分:2)

public class Employee { //Default constructor public Employee() { Name = "Some other name"; Title = "Some other title"; } //Static constructor static Employee() { } //Just a static method returning an Employee object public static Employee GetEmployee() { //Object initializer using the default constructor var emp = new Employee() { Name = "Somebody", Title = "Developer" }; return emp; } public string Name { get; set; } public string Title { get; set; } } 速记属性的官方W3C规范如下:https://www.w3.org/TR/css3-background/#the-background

size属性以背景位置和正斜杠后面的速记写入。例如:

background

相当于:

p { background: url("chess.png") 40% / 10em gray round fixed border-box; }