我们可以为每个 background-image 指定不同的 background-attachment 属性值,用逗号分隔。每个图像都将与此属性的相应值匹配。 用法 background-attachment:scroll|fixed|local|initial|inherit; 该属性的值定义如下。 属性值 scroll:它是防止元素随内容滚动但随页面滚动的默认值。 fixed:使用此值,背景图像不会随元素...
用法例句 1. The background image is taken from an attachment to a document called gradblue10.jpg. 背景图像取自名为gradblue10 . j pg的文档的附件。 2. Background: Radiographic landmarks for medial knee attachment sites during anatomic repairs or reconstructions are unknown. ...
* @returns string $value if it is valid */functionigthemes_sanitize_background_attachment($value){$recognized=igthemes_recognized_background_attachment();if(array_key_exists($value,$recognized)){return$value;}returnapply_filters('igthemes_default_background_attachment',current($recognized));} 示例...
background-attachment:scroll; Example: <!DOCTYPEhtml> background-attachmentproperty #example{background-image:url("https://media.geeksforgeeks.org/wp-content/uploads/geeks-25.png");background-position:center;background-repeat:no-repeat;background-attachment:fixed; } GeeksforGeeks background-...
backgroundAttachment 属性用于设置或获取背景图像是否应相对于页面内容滚动。 用法 以下是语法 - 设置backgroundAttachment 属性 - object.style.backgroundAttachment = "scroll|fixed|local|initial|inherit" 值 以下是值 - Sr.No值和描述 1 Scroll这是默认值,它使背景与图像一起滚动。 2 Fixed这修复了关于视口的...
用法: 它返回backgroundAttachment属性。 object.style.backgroundAttachment 它用于设置backgroundAttachment属性。 object.style.backgroundAttachment= "scroll|fixed|local|initial| inherit" 属性值:每个属性值的示例说明。 滚动:此值使背景图像与元素一起滚动。它是默认值。