ul

Change bullets color of an HTML list without using span

匿名 (未验证) 提交于 2019-12-03 08:33:39
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I was wondering if there is a way to change the color on the bullets in a list. I have a list like this: House Car Garden It is not possible for me to insert anything in the li's such as a 'span' og a 'p'. So can I change the color of the bullets but not the text in some smart way? 回答1: If you can use an image then you can do this. And without an image you won't be able to change the color of the bullets only and not the text. Using an image li { list-style-image: url(images/yourimage.jpg); } See list-style-image Without using an image Then

UL display: block

匿名 (未验证) 提交于 2019-12-03 08:30:34
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am not sure if this is the right way to do this but I am trying to align a number of ULs beside each other and should drop the third UL when the screen size is smaller. I just need help with the CSS because for some reason, they keep stacking on top of one another even though I already changed the width to 50%. I already created the '@media'. HTML: <ul> <li>Content 1</li> </ul> <ul> <li>Content 2</li> </ul> <ul> <li>Content 3</li> </ul> CSS: ul { display: block; width: 100%; float:left; } @media (max-width: 767px){ ul { width: 50%; } } 回答1

grouping archive by year and month using php and mysql

匿名 (未验证) 提交于 2019-12-03 08:28:06
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want to create an archive list like this: 2014 March Feb Jan Post 1 Post 2 2013 November Post 1 I am using by PDO. the table I m using is having postDate as Datetime. postSlug is used to get a clean url. The coding I am using now is: <h1>Archives</h1> <hr /> <ul> <?php $stmt = $db->query("SELECT postTitle, Month(postDate) as Month, Year(postDate) as Year FROM blog_posts_seo ORDER BY postDate DESC"); while($row = $stmt->fetch()){ $posts = $row['postTitle']; $year = $row['Year']; $monthName = date("F", mktime(0, 0, 0, $row['Month'], 10));

自己写的面试题,自己想的答案

自古美人都是妖i 提交于 2019-12-03 07:42:30
本文转载于: 猿2048 网站☞ https://www.mk2048.com/blog/blog.php?id=h220212b1j 大家都知道‘不忘初心,方得始终’,但多少人知道‘初心易得,始终难守’。时代在变化,技术在发展,基础没变。学习新技术的时候,不应把基础落下。 1.前言 因为机缘巧合,让当了无数次面试者的我,当上了面试官,也和几个面试者交流过。既然要应对面试者,我就当然要准备面试题了,好让我大概知道面试者是什么水平。这个时候,也该详解下,自己的写的那些题目。因为题目是我自己写的,并不是网上摘的,所以知识点比较基础,也不全面。如果大家对面试题有什么建议,欢迎指点。 2.考点-面向对象 需求:定义‘ 我吃火锅 ’ 面向过程的思想是: 动作(我,吃火锅) 代码实现方面: //面向过程 let eat=function(who,someThing){ console.log(`${who}吃${someThing}`); } eat('我','火锅');//我吃火锅 使用面向对象的方式改写一下这个实例。 这道题,只希望有一个面向对象的意思在这里就行了,我期待的答案是这样的。 let person={ name:'守候', eat:function(someThing){ console.log(`${this.name}吃${someThing}`); } } person

Trouble with multi-level collapsible Bootstrap side-nav menu

匿名 (未验证) 提交于 2019-12-03 03:06:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I've been combing around looking for an example of the same problem I'm having but no luck yet. I'm trying to create a multi-level collapsible side navigation in bootstrap using bootstrap.js. My problem is that I've added in the second level but when I click the list item to trigger it to open it collapses the whole menu. When I re-open the menu, the second-level menu is open also. My code is below: <div class="sidebar-nav"> <p class="sidenav-header">Units and Lessons:</p> <ul class="nav nav-list"> <li class="nav-header" data-toggle=

php create navigation menu from multidimensional array dynamically

匿名 (未验证) 提交于 2019-12-03 03:03:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I did research on this, and wasn't able to find an exact answer. Most of the questions/answers on here pertaining to this seem to be unfinished. If anyone knows of a finished solution similar to my question, please point me in that direction! Here is my array: Array ( ['home'] => Array ( [0] => sub-home1 [1] => sub-home2 ) ['about'] => Array ( [0] => sub-about ['about2'] => Array ( [0] => sub-sub-about ) ) ['staff'] => Array ( [0] => sub-staff1 [1] => sub-staff2 ) ['contact'] => contact ) And here is what I would like to turn it into: <ul>

How to manipulate with UL with jQuery in XML+XSL generated HTML?

匿名 (未验证) 提交于 2019-12-03 02:38:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: This is the XML: <?xml version="1.0"?> <?xml-stylesheet href="a.xsl" type="text/xsl"?> <root/> This is the a.xsl stylesheet: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/1999/xhtml" version="2.0" exclude-result-prefixes="xs"> <xsl:output method="xml" omit-xml-declaration="yes"/> <xsl:template match="/"> <xsl:text disable-output-escaping="yes"><!DOCTYPE html></xsl:text> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery

Multidimensional array to HTML unordered list

匿名 (未验证) 提交于 2019-12-03 02:34:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have the following array which I want to transform into an unordered list (HTML). Array ( [0] => Array ( [url] => / [id] => 53a8717fe9ab5 [template] => home [title] => Home ) [1] => Array ( [url] => /about [id] => 53a871fe8b05b [template] => content [title] => About ) [2] => Array ( [url] => /about/sub [id] => 53cb88b7ed22d [template] => content [title] => About (sub) ) [3] => Array ( [url] => /about/sub/subsub [id] => 53cb88bc7d32d [template] => content [title] => About (subsub) ) [4] => Array ( [url] => /contact [id] => 53a8718981161

How to horizontally center an unordered list of unknown width?

匿名 (未验证) 提交于 2019-12-03 02:33:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: It is common to have a set of links in a footer represented in a list, such as: Home About Contact I want everything inside div#footer to be centered horizontally. If it was a paragraph, you would just easily say: p { text-align: center; } . Or if I knew the width of the I could just say #footer ul { width: 400px; margin: 0 auto; } . But how do you center the unordered list items without setting a fixed width on the ? EDIT: clarification - the list items should be next to each other, not below. 回答1: The solution, if your list items can be

ApiCloud框架

折月煮酒 提交于 2019-12-03 02:31:00
一、通用底部菜单和顶部菜单布局 <!doctype html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/> <meta name="format-detection" content="telephone=no,email=no,date=no,address=no"> <title>底部导航</title> <style> header{ background-color: #f2f2f2; } header ul li { height: 50px; line-height: 50px; text-align: center; display: none; color: #323237; position: relative;font-size: 18px; } header ul li.active{ display: block; } #footer{ background-color: #f2f2f2; } #footer ul li{ padding-top: 36px; padding