我想用Java枚举(枚举)创建一个UML图,它有一个或多个属性,但我对如何做到这一点很困惑.
例如,枚举可以像这样声明:
public enum Enumeration_type {
LITERAL_A("attr1_value", attr2_value, attr3_value),
LITERAL_B("attr1_value", attr2_value, attr3_value);
final String attr1;
final type_1 attr2 = initial_value_1;
final type_2 attr3;
Enumeration_type(String attr1, type_1 attr2, type_2 attr3) {
this.attr1_value = attr1;
this.attr2_value = attr2;
this.attr3_value = attr3;
}
}
Run Code Online (Sandbox Code Playgroud)
没有属性,很容易:
+--------------------+
| <<enumeration> |
| Enumeration_type |
+--------------------+
| LITERAL_A |
| LITERAL_B |
+--------------------+
Run Code Online (Sandbox Code Playgroud)
但是你如何优雅地为它建模呢?应该是这样吗?
+-----------------------------------------------------+
| <<enumeration>> |
| Enumeration_type |
+-----------------------------------------------------+
| attr1: String |
| attr2: type_1 = initial_value_1 |
| attr2: type_2 | …
Run Code Online (Sandbox Code Playgroud) 我正在创建一个包含以下部分的表单:
我对"活动和对象"部分的方法是使用列表创建这些选项.
<div class="formBlock">
Activities
<ul id="coloringAct">
<li>Activity Type A</li>
<li>Activity Type B</li>
<li>Activity Type C</li>
</ul>
</div>
Run Code Online (Sandbox Code Playgroud)
我希望能够像使用自定义列表样式(不是图像)或使用:before选择器一样创建彩色块,就像它们是列表的项目符号一样.基本上,这样的事情:
#formTable tr td .formBlock li {
list-style:none;
margin:0;
padding:0;
border-top:1px solid #DDD;
}
#formTable tr td .formBlock li:before {
content: "";
width:20px;
height:20px;
background:red;
}
Run Code Online (Sandbox Code Playgroud)
如何使用CSS完成这项工作?这不起作用.
我希望在一行中有两组列表项,以便一组从左到右,另一组从右到左; 像这样:
[li1 li2 li3]........................................[li6 li5 li4]
Run Code Online (Sandbox Code Playgroud)
我试过这个:
li{
display:inline;
}
#left{
float:left;
}
#right{
float:right;
direction:rtl;
}
Run Code Online (Sandbox Code Playgroud)
<ul>
<span id="left">
<li> item1</li>
<li> item2</li>
<li> item3</li>
</span>
<span id="right">
<li> item4</li>
<li> item5</li>
<li> item6</li>
</span>
</ul>
Run Code Online (Sandbox Code Playgroud)
输出有效,但代码无效,因为它<span>
直接在a下使用<ul>
.
什么是有效的代码?
我得到了以下卡诺图,但在计算每个表中的 XOR 表达式时仍然遇到问题。
Table 1
-------
WZ
00 01 11 10
-----------------------
00 | | | | 1 |
-----------------------
01 | 1 | | | |
-----------------------
XY 11 | | | | 1 |
-----------------------
10 | 1 | | | |
-----------------------
Table 2
-------
WZ
00 01 11 10
-----------------------
00 | | 1 | | |
-----------------------
01 | | | 1 | |
-----------------------
XY 11 | | 1 | | |
-----------------------
10 …
Run Code Online (Sandbox Code Playgroud) 我有这个HTML片段:
<ul class="custom">
<li data-bullet="a">Item 1</li>
<li data-bullet="aa">Item 2</li>
<li data-bullet="ab">Item 3.1<br/>Item 3.2</li>
<li data-bullet="c">Item 4</li>
<li data-bullet="d">Item 5</li>
<li data-bullet="de">Item 6</li>
</ul>
Run Code Online (Sandbox Code Playgroud)
和CSS:
.custom {
list-style:none;
padding:0;
margin:0;
}
.custom li:before {
display:inline-block;
content:attr(data-bullet);
width:50px;
}
/*
.custom {
list-style:none;
padding:0;
margin:0;
}
.custom li:before {
display:inline-block;
content:attr(data-bullet);
position:relative;
top:0;
left:-50px;
}
.custom li {
padding-left:50px;
}
*/
Run Code Online (Sandbox Code Playgroud)
http://jsfiddle.net/g0w989aa/1/
它在列表项的内容之前使用CSS以创建自定义列表编号.问题是如果列表项的内容长于一行,则文本的对齐不能正常工作.
有没有办法正确对齐线条的内容?我已经尝试将内容定位为相对并为列表项提供填充(请参阅示例中的注释掉的css),但这也不起作用.
我正在为我正在学习的课程的网站上工作,但我遇到了列表问题。我需要在特定页面上显示一个列表,以较低的 alpha 作为项目符号类型,但没有显示任何内容。
我已经使用 Notepad++ 中的查找工具来搜索所有包含 list-style-type 的行,并检查它们没有设置为 none。
我还需要导航栏上的列表将图像作为样式类型。
包含列表和 CSS 的 HTML 页面:
@font-face{ font-family:customFont; src: url('../fonts/Balkeno.ttf'); }
* {
margin: 0;
border: 0;
padding: 0;
font-size: 12px;
font-family: arial, sans-serif;
}
body {
width: 100%;
height: 300%;
background-color: #D8D8D8;
}
nav {
font-family: customFont;
font-size: 30px;
width: 100%;
height: 50px;
position: fixed;
z-index: 50;
}
.nav-background {
width: 100%;
height: 100%;
background: #12A7CB;
opacity: 0;
position: absolute;
}
.nav-content {
position: relative;
top: 50%;
transform: translateY(-50%);
} …
Run Code Online (Sandbox Code Playgroud)