整合营销服务商

电脑端+手机端+微信端=数据同步管理

免费咨询热线:

CSS3 border-image-repeat 属性

设置重复图像的方式:

div {

border-image-source: url(border.png);

border-image-repeat: repeat;

}


定义和使用

border-image-repeat 属性用于图像边界是否应重复(repeated)、拉伸(stretched)或铺满(rounded)。

提示:你可以查看 border-image 属性 (简写属性用于设置所有 border-image-* 属性)。

默认值:stretch
继承性:no
动画:no. 查看 animatable
版本:CSS3
JavaScript 语法:object.style.borderImageRepeat="round"尝试一下

浏览器支持

表格中的数字表示支持该事件的第一个浏览器的版本号。

属性
border-image-repeat15.011.015.06.015.0

CSS 语法

border-image-repeat: stretch|repeat|round|initial|inherit;

注意: 该属性规定如何延展和铺排边框图像的边缘和中间部分。因此,您可以规定两个值。如果省略第二个值,则采取与第一个值相同的值。

属性值

描述实例
stretch默认值。拉伸图像来填充区域查看实例 »
repeat平铺(repeated)图像来填充区域。查看实例 »
round类似 repeat 值。如果无法完整平铺所有图像,则对图像进行缩放以适应区域。查看实例 »
space类似 repeat 值。如果无法完整平铺所有图像,扩展空间会分布在图像周围
initial将此属性设置为默认值。查看 initial查看实例 »
inherit从父元素中继承该属性。 查看 inherit

如您还有不明白的可以在下面与我留言或是与我探讨QQ群308855039,我们一起飞!

evExpress VCL Controls是 Devexpress公司旗下最老牌的用户界面套包。所包含的控件有:数据录入,图表,数据分析,导航,布局,网格,日程管理,样式,打印和工作流等,让您快速开发出完美、强大的VCL应用程序!DevExpress广泛应用于ECM企业内容管理、 成本管控、进程监督、生产调度,在企业/政务信息化管理中占据一席重要之地。

【适用范围】:Delphi / C++Builder XE2 / XE3 / XE4 / XE5 / XE6 / XE7 / XE8 / XE10 , Embarcadero Delphi , C++Builder 10 Seattle

慧都增值服务——助您打造成功软件

1) DXperience最新版本汉化资源(2万词汇专业汉化、节约3成项目研发时间、一行代码轻松搞定!)

2) DevExpress for .NET高级培训(“功能讲解+示例演示+实战演练”三位一体的培训模式,让您真正学有所获!)

3) DevExpress中文视频课程

此列表包含了v18.2.3中解决的问题:

ExpressLibrary

  • T699865 - cxFilterControl - The dialog's controls are not skinned

ExpressQuantumGrid Suite

  • T691456 - Server Mode - An AV occurs on applying a filter to the View whose OptionsSelection.MultiSelect property is set to True and the DataController.Summary.Options property value includes the soMultipleSelectedRecords flag
  • T696529 - The "RowIndex out of range" exception occurs in certain cases when applying a filter to the selection and then clicking any record while holding down the Shift key if the View's OptionsSelection.MultiSelect property is set to True

ExpressRichEdit Control

  • T687023 - The control does not load external images to a document loaded from an HTML file if image source URLs include certain escape characters

ExpressScheduler Suite

  • T698697 - Day View - Classic Style - In certain cases, concurrent events do not occupy all available width within the View layout if the WorkTimeOnly property is True

ExpressSkins Library

  • T699696 - Applying a skin for the first time resets skin options set in the Project Skin Options Editor if a project has no SKINCFG file
  • T698313 - The "Unable to open file XXX.OBJ" error referring to a skin unit occurs on compiling a C++Builder project

ExpressSpreadSheet

  • T696782 - Conditional Formatting - Formulas specified in the Data Bar, Icon Set, and Color Scale formatting rules are not localized
  • T700936 - Functions inserted by AutoSum gallery items that the design-time UI generator creates in the Function Library toolbar/ribbon groups are not localized

ExpressTile Control

  • T679451 - Provide events that enable in-depth control of drag-and-drop operations on tile groups

Installation (VCL)

  • T698302 - The "Functions that differ only in their return type cannot be overloaded" error occurs on compiling a C++Builder project in RAD Studio 10.3 Rio
  • T698002 - The "Package XXX.bpl can't be installed because it is not a design time package" error referring to a DevExpress package occurs on launching the IDE after installing v18.2.2

下载DevExpress VCL Controls新版试用请下方链接

解如何使用 Ansible 在容器中执行命令。

-- Tomas Tomecek(作者)

了解如何使用 Ansible 在容器中执行命令。

容器和 Ansible 可以很好地融合在一起:从管理和编排到供应和构建。在本文中,我们将重点介绍构建部分。

如果你熟悉 Ansible,就会知道你可以编写一系列任务,ansible-playbook 命令将为你执行这些任务。你知道吗,如果你编写 Dockerfile 并运行 podman build,你还可以在容器环境中执行此类命令,并获得相同​​的结果。

这是一个例子:

- name: Serve our file using httpd
 hosts: all
 tasks:
 - name: Install httpd
 package:
 name: httpd
 state: installed
 - name: Copy our file to httpd’s webroot
 copy:
 src: our-file.txt
 dest: /var/www/html/

你可以在 Web 服务器本地或容器中执行这个剧本,并且只要你记得先创建 our-file.txt,它就可以工作。

但是这里缺少了一些东西。你需要启动(并配置)httpd 以便提供文件。这是容器构建和基础架构供应之间的区别:构建镜像时,你只需准备内容;而运行容器是另一项任务。另一方面,你可以将元数据附加到容器镜像,它会默认运行命令。

这有个工具可以帮助。试试看 ansible-bender 怎么样?

$ ansible-bender build the-playbook.yaml fedora:30 our-httpd

该脚本使用 ansible-bender 对 Fedora 30 容器镜像执行该剧本,并将生成的容器镜像命名为 our-httpd。

但是,当你运行该容器时,它不会启动 httpd,因为它不知道如何操作。你可以通过向该剧本添加一些元数据来解决此问题:

- name: Serve our file using httpd
 hosts: all
 vars:
 ansible_bender:
 base_image: fedora:30
 target_image:
 name: our-httpd
 cmd: httpd -DFOREGROUND
 tasks:
 - name: Install httpd
 package:
 name: httpd
 state: installed
 - name: Listen on all network interfaces.
 lineinfile: 
 path: /etc/httpd/conf/httpd.conf 
 regexp: '^Listen '
 line: Listen 0.0.0.0:80 
 - name: Copy our file to httpd’s webroot
 copy:
 src: our-file.txt
 dest: /var/www/html

现在你可以构建镜像(从这里开始,请以 root 用户身份运行所有命令。目前,Buildah 和 Podman 不会为无 root 容器创建专用网络):

# ansible-bender build the-playbook.yaml
PLAY [Serve our file using httpd] ****************************************************
 
TASK [Gathering Facts] *************************************************************** 
ok: [our-httpd-20191004-131941266141-cont]
TASK [Install httpd] *****************************************************************
loaded from cache: 'f053578ed2d47581307e9ba3f64f4b4da945579a082c6f99bd797635e62befd0'
skipping: [our-httpd-20191004-131941266141-cont]
TASK [Listen on all network interfaces.] *********************************************
changed: [our-httpd-20191004-131941266141-cont]
TASK [Copy our file to httpd’s webroot] **********************************************
changed: [our-httpd-20191004-131941266141-cont]
PLAY RECAP ***************************************************************************
our-httpd-20191004-131941266141-cont : ok=3 changed=2 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0
Getting image source signatures
Copying blob sha256:4650c04b851c62897e9c02c6041a0e3127f8253fafa3a09642552a8e77c044c8
Copying blob sha256:87b740bba596291af8e9d6d91e30a01d5eba9dd815b55895b8705a2acc3a825e
Copying blob sha256:82c21252bd87532e93e77498e3767ac2617aa9e578e32e4de09e87156b9189a0
Copying config sha256:44c6dc6dda1afe28892400c825de1c987c4641fd44fa5919a44cf0a94f58949f
Writing manifest to image destination
Storing signatures
44c6dc6dda1afe28892400c825de1c987c4641fd44fa5919a44cf0a94f58949f
Image 'our-httpd' was built successfully \o/

镜像构建完毕,可以运行容器了:

# podman run our-httpd
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 10.88.2.106. Set the 'ServerName' directive globally to suppress this message

是否提供文件了?首先,找出你容器的 IP:

# podman inspect -f '{{ .NetworkSettings.IPAddress }}' 7418570ba5a0
10.88.2.106

你现在可以检查了:

$ curl http://10.88.2.106/our-file.txt
Ansible is ❤

你文件内容是什么?

这只是使用 Ansible 构建容器镜像的介绍。如果你想了解有关 ansible-bender 可以做什么的更多信息,请查看它的 GitHub 页面。构建快乐!


via: https://opensource.com/article/19/10/building-container-images-ansible

作者: Tomas Tomecek 选题: lujun9972 译者: geekpi 校对: wxy

本文由 LCTT 原创编译, Linux中国 荣誉推出

点击“了解更多”可访问文内链接