我希望页脚内部的详细信息显示在一行中,现在每个都显示在一个新行上。如何使用CSS?
<footer>
<P>Kontakta mig på följande sätt</P>
<details>
<summary>Mail</summary>
<p>Bla bla bla</p>
</details>
<details>
<summary>Telefon</summary>
<p>Bla bla bla</p>
</details>
<details>
<summary>Brev</summary>
<p>Bla bla bla</p>
</details>
</footer>
答案 0 :(得分:0)
您可以使用display: inline;
或display: inline-block;
来实现这一目标。
footer details {
display: inline;
}
这是一个小提琴:https://jsfiddle.net/y8tb5jnt/
答案 1 :(得分:0)
public class ClosingDocInputFormatter : InputFormatter
{
public override Task<InputFormatterResult> ReadRequestBodyAsync(InputFormatterContext context)
{
var type = context.ModelType;
var request = context.HttpContext.Request;
MediaTypeHeaderValue requestContentType = null;
MediaTypeHeaderValue.TryParse(request.ContentType, out requestContentType);
var result = readStream(type, request.Body);
return InputFormatterResult.SuccessAsync(result);
}
private object readStream(Type type, Stream stream)
{
Type itemType;
var typeIsArray = false;
IList list;
if (type.GetGenericArguments().Length > 0)
{
itemType = type.GetGenericArguments()[0];
list = (IList)(Activator.CreateInstance(type));
}
else
{
typeIsArray = true;
itemType = type.GetElementType();
var listType = typeof(List<>);
var constructedListType = listType.MakeGenericType(itemType);
list = (IList)Activator.CreateInstance(constructedListType);
}
var reader = new StreamReader(stream);
while (!reader.EndOfStream)
{
var line = reader.ReadLine();
var values = new string[] { };
{
var itemTypeInGeneric = list.GetType().GetTypeInfo().GenericTypeArguments[0];
var item = Activator.CreateInstance(itemTypeInGeneric);
var properties = item.GetType().GetProperties();
for (int i = 0; i < values.Length; i++)
{
properties[i].SetValue(item, Convert.ChangeType(values[i], properties[i].PropertyType), null);
}
list.Add(item);
}
}
if (typeIsArray)
{
Array array = Array.CreateInstance(itemType, list.Count);
for (int t = 0; t < list.Count; t++)
{
array.SetValue(list[t], t);
}
return array;
}
return list;
}
}
应该为那个
做诀窍
display: inline;
footer p {
display: inline;
}