By Corrie Driebusch 

U.S. stocks traded around the flat line Monday as investors largely brushed off news that Greek citizens resoundingly rejected creditors' conditions for further financial aid.

The Dow Jones Industrial Average fell 23 points, or 0.1%, to 17707 after earlier being down by as much as 166 points. The S&P 500 dropped 1.7 points, or 0.1%, to 2075 and the Nasdaq Composite was down 1.3 points at 5008.

On Sunday, more than 61% of Greek citizens voted "no" in Sunday's referendum on the terms for a bailout that included pension cuts, tax increases and other measures. The referendum was on whether to accept austerity terms demanded by the country's creditors in exchange for further aid. The "no" vote appeared to increase the likelihood that Greece may eventually exit the eurozone.

Entering the weekend, many investors anticipated the result of the Greek referendum would be a "yes" vote, which European leaders had encouraged.

"What most banks and research shops were predicting was that the measure would pass, Greece would take some of its tough medicine and move on," said Erik Wytenus, global investment strategist at J.P. Morgan Private Bank. "What's more surprising is the muted market reaction."

Traders said Monday that investors instead appeared to be taking advantage of recent declines in the broader market to scoop up companies they like at lower prices. Over the last two weeks through Thursday's close, the Dow industrials and the S&P 500 lost 1.6%.

"We're looking at what is likely going to be long-term stagnant growth domestically and globally," said Justin Wiggs, managing director in equity trading at broker Stifel Nicolaus. "Investors are looking for growth opportunities, such as smaller companies, and the leader in that group has been biotech."

On Monday, the Russell 2000 index, the benchmark index for small companies, rose 0.1%. Among companies in the Russell 2000, growth companies, typically those posting sharp increases in revenue, gained 0.2%, while value companies, or those considered to be trading at a price below the company's worth, fell 0.1%.

Stocks and bonds in Europe fell on Monday, but the decline was fairly subdued. The Stoxx Europe 600 lost 0.9%, while Germany's DAX fell 1.1% and France's CAC-40 dropped 1.5%. The euro initially tumbled before paring losses, recently trading 0.8% lower against the dollar at $1.1048.

Investors bought U.S. Treasurys, viewed as a haven market, on Monday, pushing down the yield on the 10-year note to 2.328% from 2.393% Thursday. Bond yields fall as prices rise.

Earlier Monday, Greece's confrontational finance minister Yanis Varoufakis resigned, which many investors viewed as a positive sign for negotiations with creditors. "The prospect for a deal is better now that he's out," said Mr. Wytenus. "That's helping some of this market reaction."

Separately, volatility in Asian markets spilled over to U.S. markets. Stocks in Hong Kong tumbled, with the Hang Seng Index notching its worst one-day performance since 2012, as Beijing took steps to halt the recent selloff in stocks, including encouraging stock buying with borrowed money.

"It's a dangerous combination today," said Jerry Braakman, chief investment officer of First American Trust, which manages $1.1 billion, referring to the news out of Greece and China. To him, the three-week selloff in Chinese stocks is more worrying than developments in Europe.

"When you look at the proportion of revenue derived from China for U.S. firms it can be 30%, so if that economy is struggling it will be a much bigger story for the U.S. stock market than Greece," Mr. Braakman said. "Is it enough to derail the U.S. stock market? Not necessarily. But I think it will increase volatility and turmoil for the U.S. investor."

Worries about China's stock markets contributed to the price of oil falling to a three-month low. Crude oil fell 4.8% to $54.18 a barrel.

The drama surrounding the Greek debt crisis has dominated U.S. stock trading over the past several weeks. Two weeks ago, on June 22, stocks around the globe climbed as negotiations between Greece and its international creditors appeared to be moving closer to a positive conclusion. However, a week later, on June 29, stocks tumbled as talks broke down. The Greek stock market was closed for the week ahead of the referendum on Sunday, and there aren't plans to reopen it until Tuesday at the earliest.

Analysts have said that even with the recent tumult in global markets, they expect stocks to hold up better than they did in 2011 and 2012, when fears of a Greece bankruptcy swelled into worry about the financial stability of other struggling European economies, such as Spain and Portugal.

Unlike several years ago, little of Greece's government debt is currently held by banks and private investors outside of the country, which lessens the likelihood of a ripple effect of losses.

After the developments over the weekend, analysts said the probability that Greece eventually exits the eurozone is now much higher. However, they said with Europe's improving economy, they remain fairly upbeat on the region.

Mr. Wytenus said he is telling clients to keep calm, look through all the geopolitical noise, and buy European stocks.

"No matter what happens with Greek negotiations this week, the economic situation on the ground is much more improved than in 2012 when people were concerned if Greece went out, it would create a domino effect," he said. "Even if we were to see further weakness throughout the course of the week, we'd continue to advocate for clients to buy Europe."

Write to Corrie Driebusch at corrie.driebusch@wsj.com